From 5a2b46c73ee17448735a25ea7fb97b5227736715 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 17 Jul 2008 01:27:43 +0000 Subject: [PATCH] - coding style - more plugins to version svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833560 --- abstractrunner.h | 7 +++++-- animationdriver.h | 5 +++-- applet.cpp | 3 ++- dataengine.h | 6 ++++-- version.cpp | 3 +-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/abstractrunner.h b/abstractrunner.h index 9b244b833..43a1eedb5 100644 --- a/abstractrunner.h +++ b/abstractrunner.h @@ -30,6 +30,7 @@ #include #include #include +#include class KCompletion; @@ -236,11 +237,13 @@ class PLASMA_EXPORT AbstractRunner : public QObject #define K_EXPORT_PLASMA_RUNNER( libname, classname ) \ K_PLUGIN_FACTORY(factory, registerPlugin();) \ -K_EXPORT_PLUGIN(factory("plasma_runner_" #libname)) +K_EXPORT_PLUGIN(factory("plasma_runner_" #libname)) \ +K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION) #define K_EXPORT_RUNNER_CONFIG( name, classname ) \ K_PLUGIN_FACTORY(ConfigFactory, registerPlugin();) \ -K_EXPORT_PLUGIN(ConfigFactory("kcm_krunner_" #name)) +K_EXPORT_PLUGIN(ConfigFactory("kcm_krunner_" #name)) \ +K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION) #endif diff --git a/animationdriver.h b/animationdriver.h index a3c672579..f5c14ffc9 100644 --- a/animationdriver.h +++ b/animationdriver.h @@ -27,7 +27,7 @@ #include -#include +#include #include class QGraphicsItem; @@ -77,6 +77,7 @@ private: #define K_EXPORT_PLASMA_ANIMATOR(libname, classname) \ K_PLUGIN_FACTORY(factory, registerPlugin();) \ -K_EXPORT_PLUGIN(factory("plasma_animator_" #libname)) +K_EXPORT_PLUGIN(factory("plasma_animator_" #libname)) \ +K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION) #endif // multiple inclusion guard diff --git a/applet.cpp b/applet.cpp index 2bb9f4c80..f25db4f49 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1322,8 +1322,9 @@ Applet* Applet::load(const QString& appletName, uint appletId, const QVariantLis KPluginLoader plugin(*offer); - if (!Plasma::isPluginVersionCompatible(plugin.pluginVersion())) + if (!Plasma::isPluginVersionCompatible(plugin.pluginVersion())) { return 0; + } QVariantList allArgs; allArgs << offer->storageId() << appletId << args; diff --git a/dataengine.h b/dataengine.h index 35d838d53..b6aa46e27 100644 --- a/dataengine.h +++ b/dataengine.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include namespace Plasma @@ -434,6 +434,8 @@ class PLASMA_EXPORT DataEngine : public QObject */ #define K_EXPORT_PLASMA_DATAENGINE(libname, classname) \ K_PLUGIN_FACTORY(factory, registerPlugin();) \ -K_EXPORT_PLUGIN(factory("plasma_engine_" #libname)) +K_EXPORT_PLUGIN(factory("plasma_engine_" #libname)) \ +K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION) + #endif // multiple inclusion guard diff --git a/version.cpp b/version.cpp index 3017705ff..fb95b319a 100644 --- a/version.cpp +++ b/version.cpp @@ -54,8 +54,7 @@ bool isPluginVersionCompatible(unsigned int version) const quint32 minVersion = PLASMA_MAKE_VERSION(PLASMA_VERSION_MAJOR, PLASMA_VERSION_MINOR, 0); const quint32 maxVersion = PLASMA_MAKE_VERSION(PLASMA_VERSION_MAJOR, PLASMA_VERSION_MINOR, 60); - if (version < minVersion || version > maxVersion) - { + if (version < minVersion || version > maxVersion) { kDebug() << "plugin is compiled against incompatible Plasma version " << version; return false; }