Merge branch 'mart/XPlasmaRootPath'

Revieved by: Eike Hein
This commit is contained in:
Marco Martin 2014-08-12 10:34:37 +02:00
commit 0ada27caa7
2 changed files with 7 additions and 1 deletions

View File

@ -38,6 +38,9 @@ Comment[zh_TW]=Plasma 小程式
[PropertyDef::X-Plasma-API]
Type=QString
[PropertyDef::X-Plasma-RootPath]
Type=QString
[PropertyDef::X-Plasma-DropMimeTypes]
Type=QStringList

View File

@ -132,7 +132,10 @@ void AppletPrivate::init(const QString &packagePath, const QVariantList &args)
return;
}
const QString path = packagePath.isEmpty() ? appletDescription.pluginName() : packagePath;
QString path = appletDescription.property("X-Plasma-RootPath").toString();
if (path.isEmpty()) {
path = packagePath.isEmpty() ? appletDescription.pluginName() : packagePath;
}
package = new Package(PluginLoader::self()->loadPackage("Plasma/Applet", api));
package->setPath(path);