1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-05-24 11:12:27 -04:00

pluginmanager: remove append of pluginLoader on m_plugins.

Seen that it is not used we can remove from the Plugin() object and
delete the instance at the end.
This commit is contained in:
Davide Gerhard 2019-05-22 08:31:07 +02:00
parent ab2d9270ac
commit c24a37d011
No known key found for this signature in database
GPG Key ID: 7CBEFA144857DC97
2 changed files with 4 additions and 4 deletions

View File

@ -174,8 +174,10 @@ void PluginManager::loadPluginsDir(const QDir& dir)
continue; continue;
} }
delete(pluginLoader);
qInfo("PluginManager::loadPluginsDir: loaded plugin %s", qPrintable(fileName)); qInfo("PluginManager::loadPluginsDir: loaded plugin %s", qPrintable(fileName));
m_plugins.append(Plugin(fileName, pluginLoader, instance)); m_plugins.append(Plugin(fileName, instance));
} }
} }
} }

View File

@ -25,12 +25,10 @@ public:
struct Plugin struct Plugin
{ {
QString filename; QString filename;
QPluginLoader* loader;
PluginInterface* pluginInterface; PluginInterface* pluginInterface;
Plugin(const QString& _filename, QPluginLoader* pluginLoader, PluginInterface* _plugin) : Plugin(const QString& _filename, PluginInterface* _plugin) :
filename(_filename), filename(_filename),
loader(pluginLoader),
pluginInterface(_plugin) pluginInterface(_plugin)
{ } { }
}; };