Add macro for metadata handling, clean up
This commit is contained in:
parent
186fa2c181
commit
bed3980eba
@ -22,7 +22,6 @@
|
|||||||
#include "private/datacontainer_p.h"
|
#include "private/datacontainer_p.h"
|
||||||
|
|
||||||
#include <QQueue>
|
#include <QQueue>
|
||||||
#include <QTemporaryFile>
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <QTimerEvent>
|
#include <QTimerEvent>
|
||||||
@ -57,7 +56,6 @@ DataEngine::DataEngine(const KPluginInfo &plugin, QObject *parent)
|
|||||||
d->setupScriptSupport();
|
d->setupScriptSupport();
|
||||||
d->script->init();
|
d->script->init();
|
||||||
} else {
|
} else {
|
||||||
// kDebug() << "called";
|
|
||||||
// default implementation does nothing. this is for engines that have to
|
// default implementation does nothing. this is for engines that have to
|
||||||
// start things in motion external to themselves before they can work
|
// start things in motion external to themselves before they can work
|
||||||
}
|
}
|
||||||
@ -69,12 +67,9 @@ DataEngine::DataEngine(QObject* parent, const QVariantList &args)
|
|||||||
if (d->script) {
|
if (d->script) {
|
||||||
d->setupScriptSupport();
|
d->setupScriptSupport();
|
||||||
d->script->init();
|
d->script->init();
|
||||||
} else {
|
|
||||||
// kDebug() << "called";
|
|
||||||
// default implementation does nothing. this is for engines that have to
|
|
||||||
// start things in motion external to themselves before they can work
|
|
||||||
}
|
}
|
||||||
|
qDebug() << "PWC dataengine: " << d->dataEngineDescription.isValid() << d->dataEngineDescription.name();
|
||||||
|
qDebug() << "PWC args: " << args;
|
||||||
}
|
}
|
||||||
|
|
||||||
DataEngine::~DataEngine()
|
DataEngine::~DataEngine()
|
||||||
@ -399,10 +394,8 @@ DataEnginePrivate::DataEnginePrivate(DataEngine *e, const KPluginInfo &info, con
|
|||||||
|
|
||||||
if (dataEngineDescription.isValid()) {
|
if (dataEngineDescription.isValid()) {
|
||||||
e->setObjectName(dataEngineDescription.name());
|
e->setObjectName(dataEngineDescription.name());
|
||||||
qDebug() << "Plugininfo is valid! :-)";
|
|
||||||
} else {
|
} else {
|
||||||
e->setObjectName("NullEngine");
|
e->setObjectName("NullEngine");
|
||||||
qDebug() << "Plugininfo is INVALID! :-)";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataEngineDescription.isValid()) {
|
if (dataEngineDescription.isValid()) {
|
||||||
|
@ -432,6 +432,11 @@ 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)
|
K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION)
|
||||||
|
|
||||||
|
#define K_EXPORT_PLASMA_DATAENGINE_WITH_METADATA(libname, classname, jsonFile) \
|
||||||
|
K_PLUGIN_FACTORY_WITH_METADATA(factory, jsonFile, registerPlugin<classname>();) \
|
||||||
|
K_EXPORT_PLUGIN(factory("plasma_engine_" #libname)) \
|
||||||
|
K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION)
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(Plasma::DataEngine*)
|
Q_DECLARE_METATYPE(Plasma::DataEngine*)
|
||||||
|
|
||||||
#endif // multiple inclusion guard
|
#endif // multiple inclusion guard
|
||||||
|
Loading…
Reference in New Issue
Block a user