Kevin Kofler 99300b2
diff -ur kde-runtime-4.9.98/plasma/declarativeimports/plasmacomponents/CMakeLists.txt kde-runtime-4.9.98-kde#310486/plasma/declarativeimports/plasmacomponents/CMakeLists.txt
Kevin Kofler 99300b2
--- kde-runtime-4.9.98/plasma/declarativeimports/plasmacomponents/CMakeLists.txt	2012-12-17 15:24:58.000000000 +0100
Kevin Kofler 99300b2
+++ kde-runtime-4.9.98-kde#310486/plasma/declarativeimports/plasmacomponents/CMakeLists.txt	2013-01-27 20:01:31.000000000 +0100
Kevin Kofler 99300b2
@@ -21,7 +21,7 @@
Kevin Kofler 99300b2
 
Kevin Kofler 99300b2
 
Kevin Kofler 99300b2
 add_library(plasmacomponentsplugin SHARED ${plasmacomponents_SRCS})
Kevin Kofler 99300b2
-target_link_libraries(plasmacomponentsplugin ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBRARY} ${KDECLARATIVE_LIBRARIES} ${KDE4_PLASMA_LIBS})
Kevin Kofler 99300b2
+target_link_libraries(plasmacomponentsplugin ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBRARY} ${KDE4_PLASMA_LIBS})
Kevin Kofler 99300b2
 
Kevin Kofler 99300b2
 install(TARGETS plasmacomponentsplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/components)
Kevin Kofler 99300b2
 
Kevin Kofler 99300b2
diff -ur kde-runtime-4.9.98/plasma/declarativeimports/plasmacomponents/fullscreenwindow.cpp kde-runtime-4.9.98-kde#310486/plasma/declarativeimports/plasmacomponents/fullscreenwindow.cpp
Kevin Kofler 99300b2
--- kde-runtime-4.9.98/plasma/declarativeimports/plasmacomponents/fullscreenwindow.cpp	2012-12-17 15:24:58.000000000 +0100
Kevin Kofler 560ebb0
+++ kde-runtime-4.9.98-kde#310486/plasma/declarativeimports/plasmacomponents/fullscreenwindow.cpp	2013-01-27 22:47:38.000000000 +0100
Kevin Kofler 560ebb0
@@ -35,8 +35,8 @@
Kevin Kofler 10d606f
 
Kevin Kofler 99300b2
 #include <KWindowSystem>
Kevin Kofler 99300b2
 #include <KStandardDirs>
Kevin Kofler 99300b2
-
Kevin Kofler 10d606f
-#include <kdeclarative.h>
Kevin Kofler 10d606f
+#include <KSharedConfig>
Kevin Kofler 560ebb0
+#include <KConfigGroup>
Kevin Kofler 10d606f
 
Kevin Kofler 99300b2
 #include <Plasma/Corona>
Kevin Kofler 99300b2
 #include <Plasma/WindowEffects>
Kevin Kofler 560ebb0
@@ -124,9 +124,14 @@
Kevin Kofler 99300b2
     }
Kevin Kofler 99300b2
 
Kevin Kofler 99300b2
     //Try to figure out the path of the dialog component
Kevin Kofler 99300b2
-    const QString target = KDeclarative::componentsTarget();
Kevin Kofler 99300b2
+    QString target = getenv("KDE_PLASMA_COMPONENTS_PLATFORM");
Kevin Kofler 99300b2
+    if (target.isEmpty()) {
Kevin Kofler 99300b2
+        KConfigGroup cg(KSharedConfig::openConfig("kdeclarativerc"), "Components-platform");
Kevin Kofler 99300b2
+        target = cg.readEntry("name", "desktop");
Kevin Kofler 99300b2
+    }
Kevin Kofler 99300b2
+
Kevin Kofler 99300b2
     QString filePath;
Kevin Kofler 99300b2
-    if (target != KDeclarative::defaultComponentsTarget()) {
Kevin Kofler 99300b2
+    if (target != "desktop") {
Kevin Kofler 99300b2
         const QString file = "platformimports/" % target % "/org/kde/plasma/components/" % componentName % ".qml";
Kevin Kofler 99300b2
         filePath = KStandardDirs::locate("module", file);
Kevin Kofler 99300b2
     }
Kevin Kofler 99300b2
diff -ur kde-runtime-4.9.98/plasma/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp kde-runtime-4.9.98-kde#310486/plasma/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp
Kevin Kofler 99300b2
--- kde-runtime-4.9.98/plasma/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp	2012-12-17 15:24:58.000000000 +0100
Kevin Kofler 560ebb0
+++ kde-runtime-4.9.98-kde#310486/plasma/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp	2013-01-27 22:47:47.000000000 +0100
Kevin Kofler 560ebb0
@@ -27,11 +27,10 @@
Kevin Kofler 560ebb0
 #include "qrangemodel.h"
Kevin Kofler 560ebb0
 
Kevin Kofler 560ebb0
 #include <KSharedConfig>
Kevin Kofler 560ebb0
+#include <KConfigGroup>
Kevin Kofler 99300b2
 #include <KDebug>
Kevin Kofler 99300b2
 #include <KGlobal>
Kevin Kofler 99300b2
 
Kevin Kofler 99300b2
-#include <kdeclarative.h>
Kevin Kofler 99300b2
-
Kevin Kofler 99300b2
 #include "enums.h"
Kevin Kofler 99300b2
 #include "qmenu.h"
Kevin Kofler 99300b2
 #include "qmenuitem.h"
Kevin Kofler 560ebb0
@@ -91,8 +90,13 @@
Kevin Kofler 99300b2
     Q_ASSERT(uri == QLatin1String("org.kde.plasma.components"));
Kevin Kofler 99300b2
 
Kevin Kofler 99300b2
     //platform specific c++ components
Kevin Kofler 99300b2
-    const QString target = KDeclarative::componentsTarget();
Kevin Kofler 99300b2
-    if (target == KDeclarative::defaultComponentsTarget()) {
Kevin Kofler 99300b2
+    QString target = getenv("KDE_PLASMA_COMPONENTS_PLATFORM");
Kevin Kofler 99300b2
+    if (target.isEmpty()) {
Kevin Kofler 99300b2
+        KConfigGroup cg(KSharedConfig::openConfig("kdeclarativerc"), "Components-platform");
Kevin Kofler 99300b2
+        target = cg.readEntry("name", "desktop");
Kevin Kofler 99300b2
+    }
Kevin Kofler 99300b2
+
Kevin Kofler 99300b2
+    if (target == "desktop") {
Kevin Kofler 99300b2
         qmlRegisterType<QMenuProxy>(uri, 0, 1, "Menu");
Kevin Kofler 99300b2
         qmlRegisterType<QMenuItem>(uri, 0, 1, "MenuItem");
Kevin Kofler 99300b2
     } else {