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

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