summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2019-04-11 12:17:10 +0200
committerKai Koehne <kai.koehne@qt.io>2019-04-12 06:07:41 +0000
commit686e2ace41f4e0c8ec89b5864f898bf2ac561c5e (patch)
treeb4472c79b1c5635dfd0b4ab79b01568f68969d26 /src
parent6581f5911eb1dec25fa4870aae8e70a58b6e8dfd (diff)
Automatically register the latest import version
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: Ibe271d4814032fe758545abd31573220ed84b5f8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/imports/scxmlstatemachine/plugin.cpp4
-rw-r--r--src/imports/scxmlstatemachine/plugins.qmltypes2
-rw-r--r--src/imports/scxmlstatemachine/scxmlstatemachine.pro1
-rw-r--r--src/scxml/doc/qtscxml-index.qdoc6
-rw-r--r--src/scxml/doc/qtscxml-module-qml.qdoc6
5 files changed, 12 insertions, 7 deletions
diff --git a/src/imports/scxmlstatemachine/plugin.cpp b/src/imports/scxmlstatemachine/plugin.cpp
index 35d5668..69c2992 100644
--- a/src/imports/scxmlstatemachine/plugin.cpp
+++ b/src/imports/scxmlstatemachine/plugin.cpp
@@ -74,6 +74,10 @@ public:
qmlRegisterType<QScxmlInvokedServices>(uri, major, minor, "InvokedServices");
qmlRegisterExtendedUncreatableType<QScxmlStateMachine, QScxmlStateMachineExtended>(
uri, major, minor, "StateMachine", "Only created through derived types");
+
+ // Auto-increment the import to stay in sync with ALL future QtQuick minor versions
+ qmlRegisterModule(uri, major, QT_VERSION_MINOR);
+
qmlProtectModule(uri, 1);
}
};
diff --git a/src/imports/scxmlstatemachine/plugins.qmltypes b/src/imports/scxmlstatemachine/plugins.qmltypes
index a7a72e7..a186220 100644
--- a/src/imports/scxmlstatemachine/plugins.qmltypes
+++ b/src/imports/scxmlstatemachine/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 QtScxml 5.8'
+// 'qmlplugindump -nonrelocatable QtScxml 5.13'
Module {
dependencies: ["QtQuick 2.8"]
diff --git a/src/imports/scxmlstatemachine/scxmlstatemachine.pro b/src/imports/scxmlstatemachine/scxmlstatemachine.pro
index a45a5f3..9bc7c72 100644
--- a/src/imports/scxmlstatemachine/scxmlstatemachine.pro
+++ b/src/imports/scxmlstatemachine/scxmlstatemachine.pro
@@ -1,5 +1,6 @@
TARGET = scxml
TARGETPATH = QtScxml
+IMPORT_VERSION = 5.$$QT_MINOR_VERSION
QT = scxml qml-private core-private
diff --git a/src/scxml/doc/qtscxml-index.qdoc b/src/scxml/doc/qtscxml-index.qdoc
index 7fd77bb..b65a1c2 100644
--- a/src/scxml/doc/qtscxml-index.qdoc
+++ b/src/scxml/doc/qtscxml-index.qdoc
@@ -48,9 +48,9 @@
To import the QML types into your application, use the following import statement
in your .qml file:
- \code
- import QtScxml 5.8
- \endcode
+ \qml \QtMinorVersion
+ import QtScxml 5.\1
+ \endqml
To link against the module, add this line to your qmake .pro file:
diff --git a/src/scxml/doc/qtscxml-module-qml.qdoc b/src/scxml/doc/qtscxml-module-qml.qdoc
index e549f48..5fdae36 100644
--- a/src/scxml/doc/qtscxml-module-qml.qdoc
+++ b/src/scxml/doc/qtscxml-module-qml.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtScxml 5.8
+ \qmlmodule QtScxml 5.\QtMinorVersion
\title Qt SCXML QML Types
\ingroup qmlmodules
\brief Enables the use of SCXML state machines with QML.
@@ -34,8 +34,8 @@
To import the QML types into your application, use the following import statement
in your .qml file:
- \code
- import QtScxml 5.8
+ \code \QtMinorVersion
+ import QtScxml 5.\1
\endcode
For more information, see \l{Instantiating State Machines}.