use KDeclarative to determine the platform paths

This commit is contained in:
Aaron Seigo 2012-10-30 21:30:01 +01:00
parent 80ca71fd98
commit 70e4734eda

View File

@ -34,7 +34,9 @@
#include <knewstuff3/downloaddialog.h> #include <knewstuff3/downloaddialog.h>
#endif #endif
#include "plasma/private/wallpaper_p.h" #include "kdeclarative.h"
#include "private/wallpaper_p.h"
namespace Plasma namespace Plasma
{ {
@ -42,12 +44,10 @@ namespace Plasma
PlasmoidPackage::PlasmoidPackage(QObject *parent) PlasmoidPackage::PlasmoidPackage(QObject *parent)
: Plasma::PackageStructure(parent, QString("Plasmoid")) : Plasma::PackageStructure(parent, QString("Plasmoid"))
{ {
QString pathsString(getenv("PLASMA_CUSTOM_PREFIX_PATHS")); QStringList platform = KDeclarative::runtimePlatform();
if (!pathsString.isEmpty()) { if (!platform.isEmpty()) {
QStringList prefixPaths(pathsString.split(":")); platform.append("contents");
if (!prefixPaths.isEmpty()) { setContentsPrefixPaths(platform);
setContentsPrefixPaths(prefixPaths);
}
} }
addDirectoryDefinition("images", "images", i18n("Images")); addDirectoryDefinition("images", "images", i18n("Images"));