support platformcontents for shell packages

reviewed by: Bhushan Shah
This commit is contained in:
Marco Martin 2014-07-24 13:55:14 +02:00
parent 9ff445b0e4
commit 9760601704

View File

@ -249,6 +249,18 @@ void ShellPackage::initPackage(Plasma::Package *package)
{ {
package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/shells/"); package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/shells/");
QStringList platform = KDeclarative::KDeclarative::runtimePlatform();
if (!platform.isEmpty()) {
QMutableStringListIterator it(platform);
while (it.hasNext()) {
it.next();
it.setValue("platformcontents/" + it.value());
}
platform.append("contents");
package->setContentsPrefixPaths(platform);
}
//Directories //Directories
package->addDirectoryDefinition("applet", "applet", i18n("Applets furniture")); package->addDirectoryDefinition("applet", "applet", i18n("Applets furniture"));
package->addDirectoryDefinition("configuration", "configuration", i18n("Applets furniture")); package->addDirectoryDefinition("configuration", "configuration", i18n("Applets furniture"));