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