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.
pull/357/head
Davide Gerhard 2019-05-22 08:31:07 +02:00
rodzic ab2d9270ac
commit c24a37d011
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7CBEFA144857DC97
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

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

Wyświetl plik

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