use the standard KPluginInfo stuff for this
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=858758
This commit is contained in:
parent
d14e6c63bb
commit
28a014d6fe
@ -428,7 +428,7 @@ DataEnginePrivate::DataEnginePrivate(DataEngine* e, KService::Ptr service)
|
||||
return;
|
||||
}
|
||||
|
||||
engineName = service->property("X-Plasma-EngineName").toString();
|
||||
engineName = service->name();
|
||||
if (engineName.isEmpty()) {
|
||||
engineName = i18n("Unnamed");
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ Plasma::DataEngine* DataEngineManager::loadEngine(const QString& name)
|
||||
}
|
||||
|
||||
// load the engine, add it to the engines
|
||||
QString constraint = QString("[X-Plasma-EngineName] == '%1'").arg(name);
|
||||
QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(name);
|
||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/DataEngine",
|
||||
constraint);
|
||||
QString error;
|
||||
@ -170,7 +170,10 @@ QStringList DataEngineManager::listAllEngines()
|
||||
QStringList engines;
|
||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/DataEngine");
|
||||
foreach (const KService::Ptr &service, offers) {
|
||||
engines.append(service->property("X-Plasma-EngineName").toString());
|
||||
QString name = service->property("X-KDE-PluginInfo-Name").toString();
|
||||
if (!name.isEmpty()) {
|
||||
engines.append(name);
|
||||
}
|
||||
}
|
||||
|
||||
return engines;
|
||||
|
@ -60,6 +60,3 @@ Comment[x-test]=xxPlasma Data Enginexx
|
||||
Comment[zh_CN]=Plasma 数据引擎
|
||||
Comment[zh_TW]=Plasma 資料引擎
|
||||
|
||||
[PropertyDef::X-Plasma-EngineName]
|
||||
Type=QString
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user