- coding style

- more plugins to version

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833560
This commit is contained in:
Dirk Mueller 2008-07-17 01:27:43 +00:00
parent 02a008da35
commit 5a2b46c73e
5 changed files with 15 additions and 9 deletions

View File

@ -30,6 +30,7 @@
#include <plasma/plasma_export.h>
#include <plasma/runnercontext.h>
#include <plasma/querymatch.h>
#include <plasma/version.h>
class KCompletion;
@ -236,11 +237,13 @@ class PLASMA_EXPORT AbstractRunner : public QObject
#define K_EXPORT_PLASMA_RUNNER( libname, classname ) \
K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
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<classname>();) \
K_EXPORT_PLUGIN(ConfigFactory("kcm_krunner_" #name))
K_EXPORT_PLUGIN(ConfigFactory("kcm_krunner_" #name)) \
K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION)
#endif

View File

@ -27,7 +27,7 @@
#include <kgenericfactory.h>
#include <plasma/plasma_export.h>
#include <plasma/version.h>
#include <plasma/animator.h>
class QGraphicsItem;
@ -77,6 +77,7 @@ private:
#define K_EXPORT_PLASMA_ANIMATOR(libname, classname) \
K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
K_EXPORT_PLUGIN(factory("plasma_animator_" #libname))
K_EXPORT_PLUGIN(factory("plasma_animator_" #libname)) \
K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION)
#endif // multiple inclusion guard

View File

@ -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;

View File

@ -27,7 +27,7 @@
#include <KDE/KGenericFactory>
#include <KDE/KService>
#include <plasma/plasma_export.h>
#include <plasma/version.h>
#include <plasma/plasma.h>
namespace Plasma
@ -434,6 +434,8 @@ class PLASMA_EXPORT DataEngine : public QObject
*/
#define K_EXPORT_PLASMA_DATAENGINE(libname, classname) \
K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
K_EXPORT_PLUGIN(factory("plasma_engine_" #libname))
K_EXPORT_PLUGIN(factory("plasma_engine_" #libname)) \
K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION)
#endif // multiple inclusion guard

View File

@ -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;
}