diff options
Diffstat (limited to 'sigtools')
-rw-r--r-- | sigtools/PluginLoader.cpp | 7 | ||||
-rw-r--r-- | sigtools/PluginLoader_p.h | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/sigtools/PluginLoader.cpp b/sigtools/PluginLoader.cpp index 37eb9bc6..8c6f00ad 100644 --- a/sigtools/PluginLoader.cpp +++ b/sigtools/PluginLoader.cpp @@ -34,7 +34,6 @@ #include <KStandardDirs> // Qt includes -#include <QtCore/QtDebug> #include <QtCore/QFile> using namespace Sigmod; @@ -231,18 +230,16 @@ QSharedPointer<Game> PluginLoader::Private::game(const QString& name) return QSharedPointer<Game>(); } -void PluginLoader::Private::clean(const QString& type, const bool errorOnExtra) +void PluginLoader::Private::clean(const QString& type, const bool forceDeletion) { QMutableListIterator<PluginBase*> i(m_plugins[type]); while (i.hasNext()) { i.next(); - if (!i.value()->classesUsedCount()) + if (forceDeletion || !i.value()->classesUsedCount()) { delete i.value(); i.remove(); } - else if (errorOnExtra) - qCritical() << "There are still" << i.value()->classesUsedCount() << "classes in use by a plugin of type" << type; } } diff --git a/sigtools/PluginLoader_p.h b/sigtools/PluginLoader_p.h index ec2e9750..95caa92d 100644 --- a/sigtools/PluginLoader_p.h +++ b/sigtools/PluginLoader_p.h @@ -60,7 +60,7 @@ class SIGTOOLS_NO_EXPORT Private : public QObject Sigencore::Plugins::PluginBase* factory(const QString& type, const QString& name); QSharedPointer<Sigmod::Game> game(const QString& name); protected: - void clean(const QString& type, const bool errorOnExtra = false); + void clean(const QString& type, const bool forceDeletion = false); typedef QPair<KService::Ptr, Sigencore::Plugins::PluginBase*> Service; typedef QMap<QString, Service> PluginList; |