From e6ac1d4fc8e97cf6faca192fa911a6fb5c1fed9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Sat, 5 Oct 2013 02:45:37 +0200 Subject: [PATCH] Make scriptengine build without kde4support --- src/scriptengines/qml/CMakeLists.txt | 1 - .../qml/plasmoid/appletinterface.cpp | 9 ++++----- .../qml/plasmoid/containmentinterface.cpp | 15 ++++++++------- .../qml/plasmoid/declarativeappletscript.cpp | 7 +++---- .../qml/plasmoid/wallpaperinterface.cpp | 6 +++--- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/scriptengines/qml/CMakeLists.txt b/src/scriptengines/qml/CMakeLists.txt index 4903860a7..335788b7d 100644 --- a/src/scriptengines/qml/CMakeLists.txt +++ b/src/scriptengines/qml/CMakeLists.txt @@ -30,7 +30,6 @@ set_target_properties(plasma_appletscript_declarative PROPERTIES PREFIX "") target_link_libraries(plasma_appletscript_declarative KF5::KIOCore KF5::KIOWidgets - ${KDE4Support_LIBRARIES} ${KDE4Attic_LIBRARIES} ${QT_QTSCRIPT_LIBRARY} ${Qt5Quick_LIBRARIES} diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index 60f4d19a1..214a4b179 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -32,12 +32,11 @@ #include #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index 0c7d1d1dd..d7438506c 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -28,13 +28,13 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include -#include -#include +#include +#include #ifndef PLASMA_NO_KIO #include "kio/jobclasses.h" // for KIO::JobFlags @@ -239,8 +239,9 @@ void ContainmentInterface::processMimeData(QMimeData *mimeData, int x, int y) foreach (const QUrl &url, urls) { #ifndef PLASMA_NO_KIO - KMimeType::Ptr mime = KMimeType::findByUrl(url); - QString mimeName = mime->name(); + QMimeDatabase db; + const QMimeType &mime = db.mimeTypeForUrl(url); + QString mimeName = mime.name(); QVariantList args; args << url.url(); qDebug() << "can decode" << mimeName << args; diff --git a/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp b/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp index 2520a6889..3a910cc63 100644 --- a/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp +++ b/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp @@ -28,11 +28,10 @@ #include #include -#include +#include #include -#include -#include -#include +#include +#include #include #include diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp index 6d67e1e49..e4d9a47ed 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include