Commit d5cffe97 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

Making static plugin changes safe for Qt < 5.

parent 146a4e5e
...@@ -71,6 +71,9 @@ ...@@ -71,6 +71,9 @@
#include <QtScript/QScriptValueIterator> #include <QtScript/QScriptValueIterator>
#include <QThread> #include <QThread>
#include <QMutexLocker> #include <QMutexLocker>
#if QT_VERSION >= 0x050000
#include <QStaticPlugin>
#endif
#include <QPluginLoader> #include <QPluginLoader>
#include "OpenFlipper/BasePlugin/BaseInterface.hh" #include "OpenFlipper/BasePlugin/BaseInterface.hh"
...@@ -344,6 +347,7 @@ void Core::loadPlugins() ...@@ -344,6 +347,7 @@ void Core::loadPlugins()
// Prepend the additional Plugins to the plugin list // Prepend the additional Plugins to the plugin list
pluginlist = additionalPlugins << pluginlist; pluginlist = additionalPlugins << pluginlist;
#if QT_VERSION >= 0x050000
/* /*
* Remove static plugins from dynamically loaded list. * Remove static plugins from dynamically loaded list.
*/ */
...@@ -361,6 +365,7 @@ void Core::loadPlugins() ...@@ -361,6 +365,7 @@ void Core::loadPlugins()
} }
} }
} }
#endif
/* /*
* Note: This call is not necessary, anymore. Initialization order * Note: This call is not necessary, anymore. Initialization order
...@@ -456,6 +461,7 @@ void Core::loadPlugins() ...@@ -456,6 +461,7 @@ void Core::loadPlugins()
delete *it; delete *it;
} }
#if QT_VERSION >= 0x050000
/* /*
* Initialize static plugins. * Initialize static plugins.
*/ */
...@@ -473,6 +479,7 @@ void Core::loadPlugins() ...@@ -473,6 +479,7 @@ void Core::loadPlugins()
licenseTexts += pluginLicenseText; licenseTexts += pluginLicenseText;
} }
} }
#endif
emit log(LOGINFO, tr("Total time needed to load plugins was %1 ms.").arg(time.elapsed())); emit log(LOGINFO, tr("Total time needed to load plugins was %1 ms.").arg(time.elapsed()));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment