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

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