From 580c5540fa304e439a4889a0223c779b9d2ccdd6 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 10 Nov 2011 15:52:26 +0100 Subject: [PATCH] use KDE_PLASMA_COMPONENTS_PLATFORM --- .../plasmacomponents/plasmacomponentsplugin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp b/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp index ccca36ac7..b1bee475e 100644 --- a/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp +++ b/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp @@ -35,8 +35,11 @@ void PlasmaComponentsPlugin::registerTypes(const char *uri) { Q_ASSERT(uri == QLatin1String("org.kde.plasma.components")); - KConfigGroup cg(KSharedConfig::openConfig("kdeclarativerc"), "Components-platform"); - const QString componentsPlatform = cg.readEntry("name", "desktop"); + QString componentsPlatform = getenv("KDE_PLASMA_COMPONENTS_PLATFORM"); + if (componentsPlatform.isEmpty()) { + KConfigGroup cg(KSharedConfig::openConfig("kdeclarativerc"), "Components-platform"); + componentsPlatform = cg.readEntry("name", "desktop"); + } if (componentsPlatform == "desktop") { qmlRegisterType(uri, 0, 1, "QueryDialog");