Remove convertQPath functions as it's only used once, fixes a warning for the unused version
This commit is contained in:
parent
86f048fc72
commit
79e80021b1
1 changed files with 1 additions and 13 deletions
|
|
@ -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();
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue