aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/templates
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-01-10 16:47:26 +0100
committerLiang Qi <liang.qi@qt.io>2019-01-10 16:47:26 +0100
commitefa04c2ae8427c70848477ace3d8f6e82baaab11 (patch)
treec0394c9cd5ce51961337a7a15e169074dd41632b /src/imports/templates
parent9c7429219d36e8eb40e1fe6e679715c89209fc40 (diff)
parent6476de0b669162cf08c11f5c8d5ad0b42419f365 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: .qmake.conf src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: I27f1260b539354e084beb28be78385e57fda63e1
Diffstat (limited to 'src/imports/templates')
-rw-r--r--src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc2
-rw-r--r--src/imports/templates/qtquicktemplates2plugin.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc b/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc
index 01e70bb2..33ee08d3 100644
--- a/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc
+++ b/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc
@@ -38,7 +38,7 @@
\c .qml file:
\badcode
- import QtQuick.Templates 2.5 as T
+ import QtQuick.Templates 2.12 as T
\endcode
For the sake of clarity, there is a one-to-one mapping between the types
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp
index 0d5765be..510980e3 100644
--- a/src/imports/templates/qtquicktemplates2plugin.cpp
+++ b/src/imports/templates/qtquicktemplates2plugin.cpp
@@ -162,7 +162,13 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri)
registered = true;
initProviders();
- qmlRegisterModule(uri, 2, QT_VERSION_MINOR - 7); // Qt 5.7->2.0, 5.8->2.1, 5.9->2.2...
+ // Register the latest version, even if there are no new types or new revisions for existing types yet.
+ // Before Qt 5.12, we would do the following:
+ //
+ // qmlRegisterModule(uri, 2, QT_VERSION_MINOR - 7); // Qt 5.7->2.0, 5.8->2.1, 5.9->2.2...
+ //
+ // However, we want to align with the rest of Qt Quick which uses Qt's minor version.
+ qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
// QtQuick.Templates 2.0 (originally introduced in Qt 5.7)
qmlRegisterType<QQuickAbstractButton>(uri, 2, 0, "AbstractButton");