diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-03-28 15:02:35 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-03-28 15:02:35 -0400 |
commit | 642213842745411f6abc753307d35711759aee5d (patch) | |
tree | 18ffeb57541a0409190a151d4246f735575dfb06 /sigtools/PluginLoader.cpp | |
parent | 24ad4f774f08e4c739b0cb31aa0f07ec8fc67192 (diff) | |
download | sigen-642213842745411f6abc753307d35711759aee5d.tar.gz sigen-642213842745411f6abc753307d35711759aee5d.tar.xz sigen-642213842745411f6abc753307d35711759aee5d.zip |
Move the detection of classes left at deletion to PluginBase
Diffstat (limited to 'sigtools/PluginLoader.cpp')
-rw-r--r-- | sigtools/PluginLoader.cpp | 7 |
1 files changed, 2 insertions, 5 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; } } |