Blame SOURCES/kde-runtime-4.9.98-kde#310486.patch

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