mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-14 09:34:39 -04:00
Remove convertQPath functions as it's only used once, fixes a warning for the unused version
This commit is contained in:
@@ -3,18 +3,6 @@
|
||||
#include "PluginManager.h"
|
||||
#include "OpenRGBThemeManager.h"
|
||||
|
||||
// These two functions address the lack of a type-aware way to construct a QString
|
||||
// Allows to avoid double conversions
|
||||
static QString convertQPath(const std::string & filepath)
|
||||
{
|
||||
return QString::fromStdString(filepath);
|
||||
}
|
||||
static QString convertQPath(const std::wstring & filepath)
|
||||
{
|
||||
return QString::fromStdWString(filepath);
|
||||
}
|
||||
|
||||
|
||||
PluginManager::PluginManager()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -117,7 +105,7 @@ void PluginManager::AddPlugin(const filesystem::path& path)
|
||||
| Create a QPluginLoader and load the plugin |
|
||||
\*-----------------------------------------------------------------*/
|
||||
std::string path_string = path.generic_u8string();
|
||||
QPluginLoader* loader = new QPluginLoader(convertQPath(path_string));
|
||||
QPluginLoader* loader = new QPluginLoader(QString::fromStdString(path_string));
|
||||
QObject* instance = loader->instance();
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
|
||||
Reference in New Issue
Block a user