aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2019-04-11 12:34:39 +0200
committerKai Koehne <kai.koehne@qt.io>2019-04-12 15:19:41 +0000
commit24e0c897fac375514396191db7b582505028c918 (patch)
tree8eee9951aef67796249888947f6dac9e57f2a301
parentf5f5eea1e204642c25360106825a92a9336584b4 (diff)
Automatically register the latest import versionv5.13.0-beta3
This follows what was done in d28c9f6a for Qt Quick Controls 2. The latest import version (e.g. 1.14 in Qt 5.14) will automatically be registered whenever the Qt version is bumped. This avoids needing to wait until a new type is added (or a new revision is added to an existing type) before being able to use the newest Qt Quick version. Change-Id: I2570c2bc50c629101adb763e5e5f90bc3ded8bac Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
-rw-r--r--src/imports/webchannel/plugin.cpp3
-rw-r--r--src/imports/webchannel/plugins.qmltypes2
-rw-r--r--src/imports/webchannel/webchannel.pro2
-rw-r--r--src/webchannel/doc/src/index.qdoc6
-rw-r--r--src/webchannel/doc/src/module.qdoc8
5 files changed, 12 insertions, 9 deletions
diff --git a/src/imports/webchannel/plugin.cpp b/src/imports/webchannel/plugin.cpp
index 1abf648..b6d4018 100644
--- a/src/imports/webchannel/plugin.cpp
+++ b/src/imports/webchannel/plugin.cpp
@@ -60,6 +60,9 @@ void QWebChannelPlugin::registerTypes(const char *uri)
int major = 1;
int minor = 0;
qmlRegisterType<QQmlWebChannel>(uri, major, minor, "WebChannel");
+
+ // Auto-increment the import to stay in sync with ALL future QtQuick minor versions
+ qmlRegisterModule(uri, major, QT_VERSION_MINOR);
}
QT_END_NAMESPACE
diff --git a/src/imports/webchannel/plugins.qmltypes b/src/imports/webchannel/plugins.qmltypes
index c138386..76cf5e4 100644
--- a/src/imports/webchannel/plugins.qmltypes
+++ b/src/imports/webchannel/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtWebChannel 1.0'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtWebChannel 1.13'
Module {
dependencies: []
diff --git a/src/imports/webchannel/webchannel.pro b/src/imports/webchannel/webchannel.pro
index 4c8d322..fd69605 100644
--- a/src/imports/webchannel/webchannel.pro
+++ b/src/imports/webchannel/webchannel.pro
@@ -3,7 +3,7 @@ QT = core quick webchannel-private
INCLUDEPATH += ../../webchannel
VPATH += ../../webchannel
-IMPORT_VERSION = 1.0
+IMPORT_VERSION = 1.$$QT_MINOR_VERSION
SOURCES += \
plugin.cpp
diff --git a/src/webchannel/doc/src/index.qdoc b/src/webchannel/doc/src/index.qdoc
index 439c4a3..17f6d15 100644
--- a/src/webchannel/doc/src/index.qdoc
+++ b/src/webchannel/doc/src/index.qdoc
@@ -59,9 +59,9 @@
\endcode
The QML types are accessed by using:
- \badcode
- import QtWebChannel 1.0
- \endcode
+ \qml \QtMinorVersion
+ import QtWebChannel 1.\1
+ \endqml
\section1 Licenses
diff --git a/src/webchannel/doc/src/module.qdoc b/src/webchannel/doc/src/module.qdoc
index 1462609..1a46b3c 100644
--- a/src/webchannel/doc/src/module.qdoc
+++ b/src/webchannel/doc/src/module.qdoc
@@ -48,13 +48,13 @@
*/
/*!
- \qmlmodule QtWebChannel 1.0
+ \qmlmodule QtWebChannel 1.\QtMinorVersion
\title Qt WebChannel QML Types
\since 5.4
\brief List of QML types that provide WebChannel functionality.
The QML types are accessed by using:
- \badcode
- import QtWebChannel 1.0
- \endcode
+ \qml \QtMinorVersion
+ import QtWebChannel 1.\1
+ \endqml
*/