Use KPluginTrader to locate the dataengine.
This commit is contained in:
parent
58a2a8d6bb
commit
e81b635406
@ -58,6 +58,7 @@ public:
|
|||||||
static QSet<QString> s_customCategories;
|
static QSet<QString> s_customCategories;
|
||||||
QHash<QString, QWeakPointer<PackageStructure> > structures;
|
QHash<QString, QWeakPointer<PackageStructure> > structures;
|
||||||
bool isDefaultLoader;
|
bool isDefaultLoader;
|
||||||
|
QString pluginDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
QSet<QString> PluginLoaderPrivate::s_customCategories;
|
QSet<QString> PluginLoaderPrivate::s_customCategories;
|
||||||
@ -110,6 +111,7 @@ QString PluginLoaderPrivate::parentAppConstraint(const QString &parentApp)
|
|||||||
PluginLoader::PluginLoader()
|
PluginLoader::PluginLoader()
|
||||||
: d(new PluginLoaderPrivate)
|
: d(new PluginLoaderPrivate)
|
||||||
{
|
{
|
||||||
|
d->pluginDir = "kf5";
|
||||||
d->isDefaultLoader = false;
|
d->isDefaultLoader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -709,8 +711,9 @@ KPluginInfo::List PluginLoader::listDataEngineInfo(const QString &parentApp)
|
|||||||
constraint.append("[X-KDE-ParentApp] == '").append(parentApp).append("'");
|
constraint.append("[X-KDE-ParentApp] == '").append(parentApp).append("'");
|
||||||
}
|
}
|
||||||
|
|
||||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/DataEngine", constraint);
|
list.append(KPluginTrader::self()->query(QStringLiteral("Plasma/DataEngine"),
|
||||||
return list + KPluginInfo::fromServices(offers);
|
d->pluginDir, constraint));
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
KPluginInfo::List PluginLoader::listRunnerInfo(const QString &parentApp)
|
KPluginInfo::List PluginLoader::listRunnerInfo(const QString &parentApp)
|
||||||
|
Loading…
Reference in New Issue
Block a user