use the standard KPluginInfo stuff for this

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=858758
This commit is contained in:
Aaron J. Seigo 2008-09-08 16:55:05 +00:00
parent d14e6c63bb
commit 28a014d6fe
3 changed files with 6 additions and 6 deletions

View File

@ -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");
}

View File

@ -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;

View File

@ -60,6 +60,3 @@ Comment[x-test]=xxPlasma Data Enginexx
Comment[zh_CN]=Plasma
Comment[zh_TW]=Plasma
[PropertyDef::X-Plasma-EngineName]
Type=QString