diff options
author | Sze Howe Koh <szehowe.koh@gmail.com> | 2014-10-03 23:46:52 +0800 |
---|---|---|
committer | Sze Howe Koh <szehowe.koh@gmail.com> | 2014-12-01 12:00:56 +0100 |
commit | 759b6b12489b68fcbd755398ff9337acefb035a0 (patch) | |
tree | d76be590738e76222194f915d0ba34a23d5c0c31 /src | |
parent | 44a5d30b863b536768afddf4792ebb93585a644a (diff) | |
download | qtwebsockets-759b6b12489b68fcbd755398ff9337acefb035a0.tar.gz |
Rename QML import from "Qt.WebSockets" to "QtWebSockets"
This is in line with all other modules (e.g. "QtWebEngine 1.x",
"QtQuick 2.x", "QtWebKit 3.x", "QtSensors 5.x")
The old name is retained for compatibility with code from Qt 5.3. This
is achieved by having a dummy qmldir file in the old location.
Change-Id: I66576abe5edb44c3338c47b2980f34574129af01
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/imports.pro | 3 | ||||
-rw-r--r-- | src/imports/qmlwebsockets/plugins.qmltypes | 4 | ||||
-rw-r--r-- | src/imports/qmlwebsockets/qmldir | 2 | ||||
-rw-r--r-- | src/imports/qmlwebsockets/qmlwebsockets.pro | 2 | ||||
-rw-r--r-- | src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp | 5 | ||||
-rw-r--r-- | src/imports/qmlwebsockets/qqmlwebsocket.cpp | 2 | ||||
-rw-r--r-- | src/imports/qmlwebsockets/qqmlwebsocketserver.cpp | 2 | ||||
-rw-r--r-- | src/imports/qmlwebsockets_compat/qmldir | 4 | ||||
-rw-r--r-- | src/imports/qmlwebsockets_compat/qmlwebsockets_compat.pro | 7 | ||||
-rw-r--r-- | src/websockets/doc/src/qtwebsockets-module.qdoc | 4 |
10 files changed, 24 insertions, 11 deletions
diff --git a/src/imports/imports.pro b/src/imports/imports.pro index 6bf8069..bb0d300 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,3 +1,4 @@ TEMPLATE = subdirs -SUBDIRS += qmlwebsockets +SUBDIRS += qmlwebsockets \ + qmlwebsockets_compat diff --git a/src/imports/qmlwebsockets/plugins.qmltypes b/src/imports/qmlwebsockets/plugins.qmltypes index 4404a51..5b8d1f9 100644 --- a/src/imports/qmlwebsockets/plugins.qmltypes +++ b/src/imports/qmlwebsockets/plugins.qmltypes @@ -4,13 +4,13 @@ import QtQuick.tooling 1.1 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -notrelocatable Qt.WebSockets 1.0' +// 'qmlplugindump -notrelocatable QtWebSockets 1.0' Module { Component { name: "QQmlWebSocket" prototype: "QObject" - exports: ["Qt.WebSockets/WebSocket 1.0"] + exports: ["QtWebSockets/WebSocket 1.0"] exportMetaObjectRevisions: [0] Enum { name: "Status" diff --git a/src/imports/qmlwebsockets/qmldir b/src/imports/qmlwebsockets/qmldir index 3202976..130b79f 100644 --- a/src/imports/qmlwebsockets/qmldir +++ b/src/imports/qmlwebsockets/qmldir @@ -1,4 +1,4 @@ -module Qt.WebSockets +module QtWebSockets plugin declarative_qmlwebsockets classname QtWebSocketsDeclarativeModule typeinfo plugins.qmltypes diff --git a/src/imports/qmlwebsockets/qmlwebsockets.pro b/src/imports/qmlwebsockets/qmlwebsockets.pro index f7698d8..81c8646 100644 --- a/src/imports/qmlwebsockets/qmlwebsockets.pro +++ b/src/imports/qmlwebsockets/qmlwebsockets.pro @@ -1,6 +1,6 @@ QT = core websockets qml -TARGETPATH = Qt/WebSockets +TARGETPATH = QtWebSockets HEADERS += qmlwebsockets_plugin.h \ qqmlwebsocket.h \ diff --git a/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp b/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp index fea105e..684d711 100644 --- a/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp +++ b/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp @@ -42,9 +42,10 @@ QT_BEGIN_NAMESPACE void QtWebSocketsDeclarativeModule::registerTypes(const char *uri) { - Q_ASSERT(uri == QLatin1String("Qt.WebSockets")); + // ### Qt 6: Remove support for the "Qt.WebSockets" QML module. + Q_ASSERT(uri == QLatin1String("QtWebSockets") || uri == QLatin1String("Qt.WebSockets")); - // @uri Qt.WebSockets + // @uri QtWebSockets qmlRegisterType<QQmlWebSocket>(uri, 1 /*major*/, 0 /*minor*/, "WebSocket"); qmlRegisterType<QQmlWebSocketServer>(uri, 1 /*major*/, 0 /*minor*/, "WebSocketServer"); } diff --git a/src/imports/qmlwebsockets/qqmlwebsocket.cpp b/src/imports/qmlwebsockets/qqmlwebsocket.cpp index 08d39f6..568f8ce 100644 --- a/src/imports/qmlwebsockets/qqmlwebsocket.cpp +++ b/src/imports/qmlwebsockets/qqmlwebsocket.cpp @@ -36,7 +36,7 @@ \instantiates QQmlWebSocket \since 5.3 - \inqmlmodule Qt.WebSockets + \inqmlmodule QtWebSockets \ingroup websockets-qml \brief QML interface to QWebSocket. diff --git a/src/imports/qmlwebsockets/qqmlwebsocketserver.cpp b/src/imports/qmlwebsockets/qqmlwebsocketserver.cpp index 6425fe2..9c302ea 100644 --- a/src/imports/qmlwebsockets/qqmlwebsocketserver.cpp +++ b/src/imports/qmlwebsockets/qqmlwebsocketserver.cpp @@ -41,7 +41,7 @@ QT_USE_NAMESPACE \instantiates QQmlWebSocketServer \since 5.3 - \inqmlmodule Qt.WebSockets + \inqmlmodule QtWebSockets \ingroup websockets-qml \brief QML interface to QWebSocketServer. */ diff --git a/src/imports/qmlwebsockets_compat/qmldir b/src/imports/qmlwebsockets_compat/qmldir new file mode 100644 index 0000000..8541103 --- /dev/null +++ b/src/imports/qmlwebsockets_compat/qmldir @@ -0,0 +1,4 @@ +module Qt.WebSockets +plugin ../../QtWebSockets/declarative_qmlwebsockets +classname QtWebSocketsDeclarativeModule +typeinfo ../../QtWebSockets/plugins.qmltypes diff --git a/src/imports/qmlwebsockets_compat/qmlwebsockets_compat.pro b/src/imports/qmlwebsockets_compat/qmlwebsockets_compat.pro new file mode 100644 index 0000000..a6610b6 --- /dev/null +++ b/src/imports/qmlwebsockets_compat/qmlwebsockets_compat.pro @@ -0,0 +1,7 @@ +### Qt 6: Remove support for the old "Qt.WebSockets" QML module. + +QT = core websockets qml + +TARGETPATH = Qt/WebSockets + +load(qml_module) diff --git a/src/websockets/doc/src/qtwebsockets-module.qdoc b/src/websockets/doc/src/qtwebsockets-module.qdoc index dc7009b..2c5892d 100644 --- a/src/websockets/doc/src/qtwebsockets-module.qdoc +++ b/src/websockets/doc/src/qtwebsockets-module.qdoc @@ -48,7 +48,7 @@ */ /*! - \qmlmodule Qt.WebSockets 1.0 + \qmlmodule QtWebSockets 1.0 \title Qt WebSockets QML Types \ingroup qmlmodules \brief Provides QML types for WebSockets communication. @@ -57,6 +57,6 @@ The QML types are accessed by using: \code - import Qt.WebSockets 1.0 + import QtWebSockets 1.0 \endcode */ |