aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2019-04-11 11:47:11 +0200
committerKai Koehne <kai.koehne@qt.io>2019-04-12 06:06:49 +0000
commit74c8ebe9696c981311f19bdd6544634ab1b7cc7f (patch)
tree6227cf1849cb9102e8ae57c3151dd3bf887802c1
parentd451e0af881365ba7524ed93e1ef3f68154c784b (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: I3a2232d5f7418ec99441a71fb70d88835dc61a61 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--src/imports/qmlwebsockets/plugins.qmltypes2
-rw-r--r--src/imports/qmlwebsockets/qmlwebsockets.pro2
-rw-r--r--src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp3
-rw-r--r--src/websockets/doc/src/index.qdoc6
-rw-r--r--src/websockets/doc/src/qtwebsockets-module.qdoc8
5 files changed, 12 insertions, 9 deletions
diff --git a/src/imports/qmlwebsockets/plugins.qmltypes b/src/imports/qmlwebsockets/plugins.qmltypes
index 4f39a36..79e2f97 100644
--- a/src/imports/qmlwebsockets/plugins.qmltypes
+++ b/src/imports/qmlwebsockets/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 QtWebSockets 1.1'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtWebSockets 1.13'
Module {
dependencies: []
diff --git a/src/imports/qmlwebsockets/qmlwebsockets.pro b/src/imports/qmlwebsockets/qmlwebsockets.pro
index 7b6fc86..c058918 100644
--- a/src/imports/qmlwebsockets/qmlwebsockets.pro
+++ b/src/imports/qmlwebsockets/qmlwebsockets.pro
@@ -12,6 +12,6 @@ SOURCES += qmlwebsockets_plugin.cpp \
OTHER_FILES += qmldir
-IMPORT_VERSION = 1.1
+IMPORT_VERSION = 1.$$QT_MINOR_VERSION
load(qml_plugin)
diff --git a/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp b/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp
index 24fe34a..467e08c 100644
--- a/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp
+++ b/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp
@@ -55,6 +55,9 @@ void QtWebSocketsDeclarativeModule::registerTypes(const char *uri)
qmlRegisterType<QQmlWebSocket>(uri, 1 /*major*/, 0 /*minor*/, "WebSocket");
qmlRegisterType<QQmlWebSocket, 1>(uri, 1 /*major*/, 1 /*minor*/, "WebSocket");
qmlRegisterType<QQmlWebSocketServer>(uri, 1 /*major*/, 0 /*minor*/, "WebSocketServer");
+
+ // Auto-increment the import to stay in sync with ALL future QtQuick minor versions
+ qmlRegisterModule(uri, 1, QT_VERSION_MINOR);
}
QT_END_NAMESPACE
diff --git a/src/websockets/doc/src/index.qdoc b/src/websockets/doc/src/index.qdoc
index c23f6fe..81a2cb4 100644
--- a/src/websockets/doc/src/index.qdoc
+++ b/src/websockets/doc/src/index.qdoc
@@ -51,9 +51,9 @@
To import the QML types into your application, use the following import statement in your .qml file:
- \code
- import QtWebSockets 1.0
- \endcode
+ \qml \QtMinorVersion
+ import QtWebSockets 1.\1
+ \endqml
To link against the module, add this line to your qmake .pro file:
diff --git a/src/websockets/doc/src/qtwebsockets-module.qdoc b/src/websockets/doc/src/qtwebsockets-module.qdoc
index c1f7958..83c561d 100644
--- a/src/websockets/doc/src/qtwebsockets-module.qdoc
+++ b/src/websockets/doc/src/qtwebsockets-module.qdoc
@@ -48,16 +48,16 @@
*/
/*!
- \qmlmodule QtWebSockets 1.1
+ \qmlmodule QtWebSockets 1.\QtMinorVersion
\title Qt WebSockets QML Types
\ingroup qmlmodules
\brief Provides QML types for WebSocket-based communication.
The QML types are accessed by using:
- \code
- import QtWebSockets 1.1
- \endcode
+ \qml \QtMinorVersion
+ import QtWebSockets 1.\1
+ \endqml
\note Prior to Qt 5.5, the import statement was \c{import Qt.WebSockets 1.0}
(notice the dot between \c Qt and \c WebSockets). The old statement is still