Instantiate KPluginInfo from args
This uses the new ctor in KPluginInfo, which handles the args passed from KPluginLoader nicely and constructs a KPluginInfo from them.
This commit is contained in:
parent
de78cb0b95
commit
e9a459a262
@ -63,8 +63,16 @@ DataEngine::DataEngine(const KPluginInfo &plugin, QObject *parent, const QVarian
|
|||||||
}
|
}
|
||||||
|
|
||||||
DataEngine::DataEngine(QObject* parent, const QVariantList &args)
|
DataEngine::DataEngine(QObject* parent, const QVariantList &args)
|
||||||
: Plasma::DataEngine(KPluginInfo(), parent, args)
|
: Plasma::DataEngine(KPluginInfo(args), parent, args)
|
||||||
{
|
{
|
||||||
|
if (d->script) {
|
||||||
|
d->setupScriptSupport();
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -390,7 +398,7 @@ DataEnginePrivate::DataEnginePrivate(DataEngine *e, const KPluginInfo &info, con
|
|||||||
|
|
||||||
if (!info.isValid()) {
|
if (!info.isValid()) {
|
||||||
qDebug() << "######################################################";
|
qDebug() << "######################################################";
|
||||||
qDebug() << "\n\n arg constructor for timeengine :(" << args.count() << args;
|
qDebug() << "\n\n arg constructor for DataEngine :(" << args.count() << args;
|
||||||
qDebug() << "\n######################################################";
|
qDebug() << "\n######################################################";
|
||||||
KConfig _c("/tmp/pluginconfig.desktop", KConfig::SimpleConfig);
|
KConfig _c("/tmp/pluginconfig.desktop", KConfig::SimpleConfig);
|
||||||
KConfigGroup c = _c.group("Desktop Entry");
|
KConfigGroup c = _c.group("Desktop Entry");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user