[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdelibs/sebas/kplugins] staging/kservice/src/plugin: Add init and registerPlugin functions in macro
From: Sebastian_Kügler <sebas () kde ! org>
Date: 2013-07-01 2:09:38
Message-ID: E1UtTYg-0007cO-T0 () scm ! kde ! org
[Download RAW message or body]
Git commit 8e5f2b6da9268d9b5cebfce0278508d3609e947d by Sebastian Kügler.
Committed on 01/07/2013 at 00:58.
Pushed by sebas into branch 'sebas/kplugins'.
Add init and registerPlugin functions in macro
M +10 -0 staging/kservice/src/plugin/kpluginfactory.h
http://commits.kde.org/kdelibs/8e5f2b6da9268d9b5cebfce0278508d3609e947d
diff --git a/staging/kservice/src/plugin/kpluginfactory.h \
b/staging/kservice/src/plugin/kpluginfactory.h index 00dabf0..df354e4 100644
--- a/staging/kservice/src/plugin/kpluginfactory.h
+++ b/staging/kservice/src/plugin/kpluginfactory.h
@@ -66,11 +66,21 @@ class name : public KPluginFactory \
Q_INTERFACES(KPluginFactory) \
\
public: \
+ explicit name(const char * = 0, const char * = 0, QObject * = 0) \
+ { \
+ init(); \
+ } \
+\
virtual QObject *create(const char *iface, QWidget *parentWidget, QObject \
*parent, const QVariantList &args, const QString &keyword) \ { \
return new baseclass(parent, args); \
} \
\
+ private: \
+ void init() \
+ { \
+ registerPlugin<baseclass>(); \
+ } \
}; \
\
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic