[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdelibs/frameworks] staging/kservice/src/plugin: Port to Q_GLOBAL_STATIC
From:       David Faure <faure () kde ! org>
Date:       2012-09-18 17:26:35
Message-ID: 20120918172635.1EB7DA60DC () git ! kde ! org
[Download RAW message or body]

Git commit 6a94e04c2d9f8553fabd33d1511c2364c7d2c6b7 by David Faure.
Committed on 16/09/2012 at 23:09.
Pushed by dfaure into branch 'frameworks'.

Port to Q_GLOBAL_STATIC

M  +5    -5    staging/kservice/src/plugin/kpluginfactory.h

http://commits.kde.org/kdelibs/6a94e04c2d9f8553fabd33d1511c2364c7d2c6b7

diff --git a/staging/kservice/src/plugin/kpluginfactory.h b/staging/kservice/src/plugin/kpluginfactory.h
index acbc166..0f47d43 100644
--- a/staging/kservice/src/plugin/kpluginfactory.h
+++ b/staging/kservice/src/plugin/kpluginfactory.h
@@ -46,23 +46,23 @@ class name : public baseFactory \
 };
 
 #define K_PLUGIN_FACTORY_DEFINITION_WITH_BASEFACTORY(name, baseFactory, pluginRegistrations) \
-K_GLOBAL_STATIC(KComponentData, name##factorycomponentdata) \
+Q_GLOBAL_STATIC(KComponentData, name##factorycomponentdata) \
 name::name(const char *componentName, const char *catalogName, QObject *parent) \
     : baseFactory(componentName, catalogName, parent) { init(); } \
 name::name(const KAboutData &aboutData, QObject *parent) \
     : baseFactory(aboutData, parent) { init(); } \
 void name::init() \
 { \
-    if (name##factorycomponentdata->isValid()) \
-        setComponentData(*name##factorycomponentdata); \
+    if (name##factorycomponentdata()->isValid()) \
+        setComponentData(*name##factorycomponentdata()); \
     else \
-        *name##factorycomponentdata = KPluginFactory::componentData(); \
+        *name##factorycomponentdata() = KPluginFactory::componentData(); \
     pluginRegistrations \
 } \
 name::~name() {} \
 KComponentData name::componentData() \
 { \
-    return *name##factorycomponentdata; \
+    return *name##factorycomponentdata(); \
 }
 
 #define K_PLUGIN_FACTORY_WITH_BASEFACTORY(name, baseFactory, pluginRegistrations) \

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic