summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2020-11-26 16:25:51 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2020-12-01 08:53:30 +0100
commite861ee912cb633643fc49d26db960b652e6f3357 (patch)
tree115bb654522f179fde1ad82c53a26327fab3f83b /src
parent935715e2a90111dd6c1894532670f5b0563f1800 (diff)
downloadqtwebsockets-e861ee912cb633643fc49d26db960b652e6f3357.tar.gz
Remove Qt5 leftovers
Change-Id: Ifecb6f90687601a20e719db3ba194e33f3303f24 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/imports/.prev_CMakeLists.txt4
-rw-r--r--src/imports/CMakeLists.txt1
-rw-r--r--src/imports/imports.pro3
-rw-r--r--src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp3
-rw-r--r--src/imports/qmlwebsockets_compat/plugins.qmltypes97
-rw-r--r--src/imports/qmlwebsockets_compat/qmldir4
-rw-r--r--src/imports/qmlwebsockets_compat/qmlwebsockets_compat.pro7
-rw-r--r--src/websockets/qwebsocketserver.cpp67
-rw-r--r--src/websockets/qwebsocketserver.h10
9 files changed, 2 insertions, 194 deletions
diff --git a/src/imports/.prev_CMakeLists.txt b/src/imports/.prev_CMakeLists.txt
deleted file mode 100644
index 5a0e274..0000000
--- a/src/imports/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# Generated from imports.pro.
-
-add_subdirectory(qmlwebsockets)
-add_subdirectory(qmlwebsockets_compat)
diff --git a/src/imports/CMakeLists.txt b/src/imports/CMakeLists.txt
index e202821..5b40f9b 100644
--- a/src/imports/CMakeLists.txt
+++ b/src/imports/CMakeLists.txt
@@ -1,4 +1,3 @@
# Generated from imports.pro.
add_subdirectory(qmlwebsockets)
-#add_subdirectory(qmlwebsockets_compat) # special case
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
index bb0d300..6bf8069 100644
--- a/src/imports/imports.pro
+++ b/src/imports/imports.pro
@@ -1,4 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS += qmlwebsockets \
- qmlwebsockets_compat
+SUBDIRS += qmlwebsockets
diff --git a/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp b/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp
index 467e08c..6678744 100644
--- a/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp
+++ b/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp
@@ -48,8 +48,7 @@ QT_BEGIN_NAMESPACE
void QtWebSocketsDeclarativeModule::registerTypes(const char *uri)
{
- // ### Qt 6: Remove support for the "Qt.WebSockets" QML module.
- Q_ASSERT(uri == QLatin1String("QtWebSockets") || uri == QLatin1String("Qt.WebSockets"));
+ Q_ASSERT(uri == QLatin1String("QtWebSockets"));
// @uri QtWebSockets
qmlRegisterType<QQmlWebSocket>(uri, 1 /*major*/, 0 /*minor*/, "WebSocket");
diff --git a/src/imports/qmlwebsockets_compat/plugins.qmltypes b/src/imports/qmlwebsockets_compat/plugins.qmltypes
deleted file mode 100644
index 961ed1c..0000000
--- a/src/imports/qmlwebsockets_compat/plugins.qmltypes
+++ /dev/null
@@ -1,97 +0,0 @@
-import QtQuick.tooling 1.2
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable Qt.WebSockets 1.0'
-
-Module {
- dependencies: []
- Component {
- name: "QQmlWebSocket"
- prototype: "QObject"
- exports: ["Qt.WebSockets/WebSocket 1.0"]
- exportMetaObjectRevisions: [0]
- Enum {
- name: "Status"
- values: {
- "Connecting": 0,
- "Open": 1,
- "Closing": 2,
- "Closed": 3,
- "Error": 4
- }
- }
- Property { name: "url"; type: "QUrl" }
- Property { name: "status"; type: "Status"; isReadonly: true }
- Property { name: "errorString"; type: "string"; isReadonly: true }
- Property { name: "active"; type: "bool" }
- Signal {
- name: "textMessageReceived"
- Parameter { name: "message"; type: "string" }
- }
- Signal {
- name: "statusChanged"
- Parameter { name: "status"; type: "Status" }
- }
- Signal {
- name: "activeChanged"
- Parameter { name: "isActive"; type: "bool" }
- }
- Signal {
- name: "errorStringChanged"
- Parameter { name: "errorString"; type: "string" }
- }
- Method {
- name: "sendTextMessage"
- type: "qlonglong"
- Parameter { name: "message"; type: "string" }
- }
- }
- Component {
- name: "QQmlWebSocketServer"
- prototype: "QObject"
- exports: ["Qt.WebSockets/WebSocketServer 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "url"; type: "QUrl"; isReadonly: true }
- Property { name: "host"; type: "string" }
- Property { name: "port"; type: "int" }
- Property { name: "name"; type: "string" }
- Property { name: "errorString"; type: "string"; isReadonly: true }
- Property { name: "listen"; type: "bool" }
- Property { name: "accept"; type: "bool" }
- Signal {
- name: "clientConnected"
- Parameter { name: "webSocket"; type: "QQmlWebSocket"; isPointer: true }
- }
- Signal {
- name: "errorStringChanged"
- Parameter { name: "errorString"; type: "string" }
- }
- Signal {
- name: "urlChanged"
- Parameter { name: "url"; type: "QUrl" }
- }
- Signal {
- name: "portChanged"
- Parameter { name: "port"; type: "int" }
- }
- Signal {
- name: "nameChanged"
- Parameter { name: "name"; type: "string" }
- }
- Signal {
- name: "hostChanged"
- Parameter { name: "host"; type: "string" }
- }
- Signal {
- name: "listenChanged"
- Parameter { name: "listen"; type: "bool" }
- }
- Signal {
- name: "acceptChanged"
- Parameter { name: "accept"; type: "bool" }
- }
- }
-}
diff --git a/src/imports/qmlwebsockets_compat/qmldir b/src/imports/qmlwebsockets_compat/qmldir
deleted file mode 100644
index a4310d9..0000000
--- a/src/imports/qmlwebsockets_compat/qmldir
+++ /dev/null
@@ -1,4 +0,0 @@
-module Qt.WebSockets
-plugin declarative_qmlwebsockets ../../QtWebSockets/
-classname QtWebSocketsDeclarativeModule
-typeinfo plugins.qmltypes
diff --git a/src/imports/qmlwebsockets_compat/qmlwebsockets_compat.pro b/src/imports/qmlwebsockets_compat/qmlwebsockets_compat.pro
deleted file mode 100644
index fbdf01c..0000000
--- a/src/imports/qmlwebsockets_compat/qmlwebsockets_compat.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-### Qt 6: Remove support for the old "Qt.WebSockets" QML module.
-
-QT = websockets qml
-
-TARGETPATH = Qt/WebSockets
-
-load(qml_module)
diff --git a/src/websockets/qwebsocketserver.cpp b/src/websockets/qwebsocketserver.cpp
index a7c6157..91c4032 100644
--- a/src/websockets/qwebsocketserver.cpp
+++ b/src/websockets/qwebsocketserver.cpp
@@ -624,7 +624,6 @@ void QWebSocketServer::setHandshakeTimeout(int msec)
d->setHandshakeTimeout(msec);
}
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
/*!
Sets the socket descriptor this server should use when listening for incoming connections to
\a socketDescriptor.
@@ -656,72 +655,6 @@ qintptr QWebSocketServer::socketDescriptor() const
return d->socketDescriptor();
}
-#else // ### Qt 6: Remove leftovers
-/*!
- \deprecated
-
- Sets the socket descriptor this server should use when listening for incoming connections to
- \a socketDescriptor.
-
- Returns true if the socket is set successfully; otherwise returns false.
- The socket is assumed to be in listening state.
-
- \sa socketDescriptor(), setSocketDescriptor(), nativeDescriptor(), isListening()
- \since 5.3
- */
-bool QWebSocketServer::setSocketDescriptor(int socketDescriptor)
-{
- return setNativeDescriptor(socketDescriptor);
-}
-
-/*!
- \deprecated
-
- Returns the native socket descriptor the server uses to listen for incoming instructions,
- or -1 if the server is not listening.
- If the server is using QNetworkProxy, the returned descriptor may not be usable with
- native socket functions.
-
- \sa nativeDescriptor(), setNativeDescriptor(), setSocketDescriptor(), isListening()
- \since 5.3
- */
-int QWebSocketServer::socketDescriptor() const
-{
- return int(nativeDescriptor());
-}
-
-/*!
- Sets the socket descriptor this server should use when listening for incoming connections to
- \a socketDescriptor.
-
- Returns true if the socket is set successfully; otherwise returns false.
- The socket is assumed to be in listening state.
-
- \sa nativeDescriptor(), isListening()
- \since 5.12
- */
-bool QWebSocketServer::setNativeDescriptor(qintptr socketDescriptor)
-{
- Q_D(QWebSocketServer);
- return d->setSocketDescriptor(socketDescriptor);
-}
-
-/*!
- Returns the native socket descriptor the server uses to listen for incoming instructions,
- or -1 if the server is not listening.
- If the server is using QNetworkProxy, the returned descriptor may not be usable with
- native socket functions.
-
- \sa setNativeDescriptor(), isListening()
- \since 5.12
- */
-qintptr QWebSocketServer::nativeDescriptor() const
-{
- Q_D(const QWebSocketServer);
- return d->socketDescriptor();
-}
-#endif // (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
-
/*!
Returns a list of WebSocket versions that this server is supporting.
*/
diff --git a/src/websockets/qwebsocketserver.h b/src/websockets/qwebsocketserver.h
index 5c32ffb..049943b 100644
--- a/src/websockets/qwebsocketserver.h
+++ b/src/websockets/qwebsocketserver.h
@@ -109,18 +109,8 @@ public:
SslMode secureMode() const;
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
bool setSocketDescriptor(qintptr socketDescriptor);
qintptr socketDescriptor() const;
- bool setNativeDescriptor(qintptr descriptor) { return setSocketDescriptor(descriptor); }
- qintptr nativeDescriptor() const { return socketDescriptor(); }
-#else // ### Qt 6: Remove leftovers
- Q_DECL_DEPRECATED_X("Use setNativeDescriptor") bool setSocketDescriptor(int socketDescriptor);
- Q_DECL_DEPRECATED_X("Use nativeDescriptor") int socketDescriptor() const;
- bool setNativeDescriptor(qintptr descriptor);
- qintptr nativeDescriptor() const;
-#endif // (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
-
bool hasPendingConnections() const;
virtual QWebSocket *nextPendingConnection();