summaryrefslogtreecommitdiff
path: root/src/controls/Styles
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2014-12-04 18:16:44 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-20 16:16:57 +0100
commite6855d875c71bc2cb7f7758706830f329d6badcb (patch)
tree454533d05224756cef1afa81ae5bb6f1ac98fdaa /src/controls/Styles
parent87762e57ebc9d5adc8f570c6e555689c7864614b (diff)
downloadqtquickcontrols-e6855d875c71bc2cb7f7758706830f329d6badcb.tar.gz
Make WinRT style use qt_quick_controls_style_init()
Change-Id: Ib78ef26e5bda1a5a3047368e8bde67f1d23bcd01 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Diffstat (limited to 'src/controls/Styles')
-rw-r--r--src/controls/Styles/WinRT/PC/WinRT.qrc (renamed from src/controls/Styles/WinRT/PC/WinRTPC.qrc)0
-rw-r--r--src/controls/Styles/WinRT/Phone/WinRT.qrc (renamed from src/controls/Styles/WinRT/Phone/WinRTPhone.qrc)0
-rw-r--r--src/controls/Styles/WinRT/WinRT.pro (renamed from src/controls/Styles/WinRT/WinRT.pri)17
-rw-r--r--src/controls/Styles/WinRT/plugin.cpp52
-rw-r--r--src/controls/Styles/WinRT/qmldir0
5 files changed, 65 insertions, 4 deletions
diff --git a/src/controls/Styles/WinRT/PC/WinRTPC.qrc b/src/controls/Styles/WinRT/PC/WinRT.qrc
index f4402a17..f4402a17 100644
--- a/src/controls/Styles/WinRT/PC/WinRTPC.qrc
+++ b/src/controls/Styles/WinRT/PC/WinRT.qrc
diff --git a/src/controls/Styles/WinRT/Phone/WinRTPhone.qrc b/src/controls/Styles/WinRT/Phone/WinRT.qrc
index f4402a17..f4402a17 100644
--- a/src/controls/Styles/WinRT/Phone/WinRTPhone.qrc
+++ b/src/controls/Styles/WinRT/Phone/WinRT.qrc
diff --git a/src/controls/Styles/WinRT/WinRT.pri b/src/controls/Styles/WinRT/WinRT.pro
index 4afa6056..504362f9 100644
--- a/src/controls/Styles/WinRT/WinRT.pri
+++ b/src/controls/Styles/WinRT/WinRT.pro
@@ -1,5 +1,8 @@
+TARGET = qtquickcontrolswinrtstyleplugin
+TARGETPATH = QtQuick/Controls/Styles/WinRT
+
!winphone: {
-QML_FILES += \
+OTHER_FILES += \
$$PWD/PC/ApplicationWindowStyle.qml \
$$PWD/PC/BusyIndicatorStyle.qml \
$$PWD/PC/ButtonStyle.qml \
@@ -25,9 +28,9 @@ QML_FILES += \
$$PWD/PC/ToolButtonStyle.qml
RESOURCES += \
- $$PWD/PC/WinRTPC.qrc
+ $$PWD/PC/WinRT.qrc
} else {
-QML_FILES += \
+OTHER_FILES += \
$$PWD/Phone/ApplicationWindowStyle.qml \
$$PWD/Phone/BusyIndicatorStyle.qml \
$$PWD/Phone/ButtonStyle.qml \
@@ -53,5 +56,11 @@ QML_FILES += \
$$PWD/Phone/ToolButtonStyle.qml
RESOURCES += \
- $$PWD/Phone/WinRTPhone.qrc
+ $$PWD/Phone/WinRT.qrc
}
+
+SOURCES += \
+ $$PWD/plugin.cpp
+
+CONFIG += no_cxx_module
+load(qml_plugin)
diff --git a/src/controls/Styles/WinRT/plugin.cpp b/src/controls/Styles/WinRT/plugin.cpp
new file mode 100644
index 00000000..a9601997
--- /dev/null
+++ b/src/controls/Styles/WinRT/plugin.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qglobal.h>
+
+static void initResources()
+{
+ Q_INIT_RESOURCE(WinRT);
+}
+
+extern "C" {
+ Q_DECL_EXPORT bool qt_quick_controls_style_init()
+ {
+ initResources();
+ return true;
+ }
+
+ Q_DECL_EXPORT const char *qt_quick_controls_style_path()
+ {
+ return ":/QtQuick/Controls/Styles/";
+ }
+}
diff --git a/src/controls/Styles/WinRT/qmldir b/src/controls/Styles/WinRT/qmldir
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/controls/Styles/WinRT/qmldir