From cd6fadc84c6a60a452622f71539509c1b66c33a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 1 Oct 2013 11:45:46 +0200 Subject: [PATCH] [aurorae] Change QML for themes to QtQuick 2 Needed for getting proper previews in the QtQuick 2 based kcm. Obviously this breaks Aurorae as Aurorae is not yet migrated to QtQuick 2. But there is no more broken than broken anyway. --- clients/aurorae/src/CMakeLists.txt | 6 +++--- clients/aurorae/src/decorationplugin.cpp | 2 +- clients/aurorae/src/decorationplugin.h | 4 ++-- clients/aurorae/src/qml/AppMenuButton.qml | 4 ++-- clients/aurorae/src/qml/AuroraeButton.qml | 4 ++-- clients/aurorae/src/qml/AuroraeButtonGroup.qml | 12 ++++++------ clients/aurorae/src/qml/AuroraeMaximizeButton.qml | 2 +- clients/aurorae/src/qml/ButtonGroup.qml | 4 ++-- clients/aurorae/src/qml/Decoration.qml | 5 ++--- clients/aurorae/src/qml/DecorationButton.qml | 2 +- clients/aurorae/src/qml/MenuButton.qml | 4 ++-- clients/aurorae/src/qml/aurorae.qml | 4 ++-- clients/aurorae/src/qml/qmldir | 1 + 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/clients/aurorae/src/CMakeLists.txt b/clients/aurorae/src/CMakeLists.txt index c8bb1e8d50..8de35f3db2 100644 --- a/clients/aurorae/src/CMakeLists.txt +++ b/clients/aurorae/src/CMakeLists.txt @@ -30,11 +30,11 @@ set(decoration_plugin_SRCS add_library(decorationplugin SHARED ${decoration_plugin_SRCS}) target_link_libraries(decorationplugin - Qt5::Declarative + Qt5::Quick kdecorations KF5::KConfigWidgets ) -install(TARGETS decorationplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/kwin/decoration) +install(TARGETS decorationplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decoration) ########### install files ############### @@ -57,5 +57,5 @@ install( FILES qml/AppMenuButton.qml qml/ButtonGroup.qml qml/qmldir - DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/kwin/decoration ) + DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decoration ) install( FILES kwindecoration.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) diff --git a/clients/aurorae/src/decorationplugin.cpp b/clients/aurorae/src/decorationplugin.cpp index 72bb0b69f2..62e222e062 100644 --- a/clients/aurorae/src/decorationplugin.cpp +++ b/clients/aurorae/src/decorationplugin.cpp @@ -17,7 +17,7 @@ along with this program. If not, see . #include "decorationplugin.h" #include "colorhelper.h" #include "decorationoptions.h" -#include +#include void DecorationPlugin::registerTypes(const char *uri) { diff --git a/clients/aurorae/src/decorationplugin.h b/clients/aurorae/src/decorationplugin.h index 97394cd7ef..ead164449c 100644 --- a/clients/aurorae/src/decorationplugin.h +++ b/clients/aurorae/src/decorationplugin.h @@ -16,9 +16,9 @@ along with this program. If not, see . *********************************************************************/ #ifndef DECORATION_PLUGIN_H #define DECORATION_PLUGIN_H -#include +#include -class DecorationPlugin : public QDeclarativeExtensionPlugin +class DecorationPlugin : public QQmlExtensionPlugin { Q_PLUGIN_METADATA(IID "org.kde.kwin.decoration") Q_OBJECT diff --git a/clients/aurorae/src/qml/AppMenuButton.qml b/clients/aurorae/src/qml/AppMenuButton.qml index 8e187822b4..79689a842f 100644 --- a/clients/aurorae/src/qml/AppMenuButton.qml +++ b/clients/aurorae/src/qml/AppMenuButton.qml @@ -14,8 +14,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -import QtQuick 1.1 -import org.kde.qtextracomponents 0.1 as QtExtra +import QtQuick 2.0 +import org.kde.qtextracomponents 2.0 as QtExtra DecorationButton { id: appMenuButton diff --git a/clients/aurorae/src/qml/AuroraeButton.qml b/clients/aurorae/src/qml/AuroraeButton.qml index 7282fd549b..9905c29786 100644 --- a/clients/aurorae/src/qml/AuroraeButton.qml +++ b/clients/aurorae/src/qml/AuroraeButton.qml @@ -14,8 +14,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -import QtQuick 1.1 -import org.kde.plasma.core 0.1 as PlasmaCore +import QtQuick 2.0 +import org.kde.plasma.core 2.0 as PlasmaCore DecorationButton { function widthForButton() { diff --git a/clients/aurorae/src/qml/AuroraeButtonGroup.qml b/clients/aurorae/src/qml/AuroraeButtonGroup.qml index c49975f7dd..cf0f9d7968 100644 --- a/clients/aurorae/src/qml/AuroraeButtonGroup.qml +++ b/clients/aurorae/src/qml/AuroraeButtonGroup.qml @@ -14,21 +14,21 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -import QtQuick 1.1 -import org.kde.plasma.core 0.1 as PlasmaCore +import QtQuick 2.0 +import org.kde.plasma.core 2.0 as PlasmaCore Item { function createButtons() { var component = Qt.createComponent("AuroraeButton.qml"); for (var i=0; i. *********************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 Item { id: button diff --git a/clients/aurorae/src/qml/ButtonGroup.qml b/clients/aurorae/src/qml/ButtonGroup.qml index 36b1f94936..693ab2a9a3 100644 --- a/clients/aurorae/src/qml/ButtonGroup.qml +++ b/clients/aurorae/src/qml/ButtonGroup.qml @@ -14,7 +14,7 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 Item { function createButtons() { @@ -58,7 +58,7 @@ Item { if (!component) { continue; } - var button = Qt.createQmlObject("import QtQuick 1.1; Loader{}", groupRow, "dynamicGroup_" + buttons + i); + var button = Qt.createQmlObject("import QtQuick 2.0; Loader{}", groupRow, "dynamicGroup_" + buttons + i); button.sourceComponent = component; } } diff --git a/clients/aurorae/src/qml/Decoration.qml b/clients/aurorae/src/qml/Decoration.qml index 1ea629b094..bec6044e15 100644 --- a/clients/aurorae/src/qml/Decoration.qml +++ b/clients/aurorae/src/qml/Decoration.qml @@ -14,10 +14,10 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 +import org.kde.kwin.decoration 0.1 Item { - signal alphaChanged() property QtObject borders: Borders { objectName: "borders" } @@ -31,7 +31,6 @@ Item { objectName: "padding" } property bool alpha: true - onAlphaChanged: alphaChanged() MouseArea { anchors.fill: parent diff --git a/clients/aurorae/src/qml/DecorationButton.qml b/clients/aurorae/src/qml/DecorationButton.qml index bf816bcc3a..cec224d4bd 100644 --- a/clients/aurorae/src/qml/DecorationButton.qml +++ b/clients/aurorae/src/qml/DecorationButton.qml @@ -14,7 +14,7 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 Item { id: button diff --git a/clients/aurorae/src/qml/MenuButton.qml b/clients/aurorae/src/qml/MenuButton.qml index 4b8401d2b6..1345cd2eb8 100644 --- a/clients/aurorae/src/qml/MenuButton.qml +++ b/clients/aurorae/src/qml/MenuButton.qml @@ -14,8 +14,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -import QtQuick 1.1 -import org.kde.qtextracomponents 0.1 as QtExtra +import QtQuick 2.0 +import org.kde.qtextracomponents 2.0 as QtExtra DecorationButton { property bool closeOnDoubleClick: true diff --git a/clients/aurorae/src/qml/aurorae.qml b/clients/aurorae/src/qml/aurorae.qml index 6a4e3fb753..ea36848fe0 100644 --- a/clients/aurorae/src/qml/aurorae.qml +++ b/clients/aurorae/src/qml/aurorae.qml @@ -14,9 +14,9 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -import QtQuick 1.1 +import QtQuick 2.0 import org.kde.kwin.decoration 0.1 -import org.kde.plasma.core 0.1 as PlasmaCore +import org.kde.plasma.core 2.0 as PlasmaCore Decoration { id: root diff --git a/clients/aurorae/src/qml/qmldir b/clients/aurorae/src/qml/qmldir index 3c36d7748c..a383ebca3a 100644 --- a/clients/aurorae/src/qml/qmldir +++ b/clients/aurorae/src/qml/qmldir @@ -1,3 +1,4 @@ +module org.kde.kwin.decoration plugin decorationplugin Decoration 0.1 Decoration.qml