aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-03-13 08:06:14 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2018-04-10 10:32:07 +0000
commitfe7d1b895de1320499694579e6402bdc603f37d9 (patch)
tree0e163340aab28fb0136bf6eab4ddb449ff741ee9 /src/imports/controls
parent71d1dfd899552c12d253282f97fd62adac182c00 (diff)
Compile QML files ahead of time in resources
After qtbase commits defe266 and 9c42959, we can use 'builtin_resources' and 'install_qml_files' configs to get qml_module.prf to do all that for us without having to write custom qrc/copy/install rules. This allows us to unconditionally enable the Qt Quick Compiler for the resources. The rest, i.e. optionally leaving out the QML files, will be handled via the Qt deployment tools. Task-number: QTBUG-67501 Change-Id: I18f2122ff4945496921b7183c365497c37dfe3a3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls')
-rw-r--r--src/imports/controls/controls.pri4
-rw-r--r--src/imports/controls/controls.pro12
2 files changed, 3 insertions, 13 deletions
diff --git a/src/imports/controls/controls.pri b/src/imports/controls/controls.pri
index 7840f6bf..675fcf39 100644
--- a/src/imports/controls/controls.pri
+++ b/src/imports/controls/controls.pri
@@ -12,7 +12,7 @@ SOURCES += \
$$PWD/qquickdefaultstyle.cpp \
$$PWD/qquickdefaulttheme.cpp
-QML_CONTROLS = \
+QML_FILES += \
$$PWD/AbstractButton.qml \
$$PWD/Action.qml \
$$PWD/ActionGroup.qml \
@@ -67,5 +67,3 @@ QML_CONTROLS = \
$$PWD/ToolSeparator.qml \
$$PWD/ToolTip.qml \
$$PWD/Tumbler.qml
-
-!qtquickcompiler: QML_FILES += $$QML_CONTROLS
diff --git a/src/imports/controls/controls.pro b/src/imports/controls/controls.pro
index 8624e243..db0d14ae 100644
--- a/src/imports/controls/controls.pro
+++ b/src/imports/controls/controls.pro
@@ -11,7 +11,7 @@ include(controls.pri)
OTHER_FILES += \
qmldir \
- $$QML_CONTROLS
+ $$QML_FILES
SOURCES += \
$$PWD/qtquickcontrols2plugin.cpp
@@ -22,15 +22,7 @@ RESOURCES += \
!static: qtConfig(quick-designer): include(designer/designer.pri)
include(doc/doc.pri)
-qtquickcompiler {
- qmlfiles.prefix = /qt-project.org/imports/QtQuick/Controls.2
- qmlfiles.files += $$QML_CONTROLS
- RESOURCES += qmlfiles
-} else:!static {
- CONFIG += qmlcache
-}
-
-CONFIG += no_cxx_module
+CONFIG += no_cxx_module install_qml_files builtin_resources qtquickcompiler
load(qml_plugin)
requires(qtConfig(quickcontrols2-default))