summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--dist/changes-5.13.018
-rw-r--r--src/plugins/platforms/webgl/qwebglintegration.cpp12
-rw-r--r--src/plugins/platforms/webgl/qwebglintegration.h2
-rw-r--r--src/plugins/platforms/webgl/qwebglintegration_p.h1
-rw-r--r--src/plugins/platforms/webgl/qwebglmain.cpp18
-rw-r--r--src/plugins/platforms/webgl/qwebglwebsocketserver.cpp9
-rw-r--r--src/plugins/platforms/webgl/qwebglwebsocketserver.h2
8 files changed, 49 insertions, 15 deletions
diff --git a/.qmake.conf b/.qmake.conf
index f1a6177..f8cda0e 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,3 +1,3 @@
load(qt_build_config)
-MODULE_VERSION = 5.12.4
+MODULE_VERSION = 5.13.0
diff --git a/dist/changes-5.13.0 b/dist/changes-5.13.0
new file mode 100644
index 0000000..ebb4be1
--- /dev/null
+++ b/dist/changes-5.13.0
@@ -0,0 +1,18 @@
+Qt 5.13 introduces many new features and improvements as well as bugfixes
+over the 5.12.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+https://doc.qt.io/qt-5/index.html
+
+The Qt version 5.13 series is binary compatible with the 5.12.x series.
+Applications compiled for 5.12 will continue to run with 5.13.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+ - This release contains only minor code improvements.
diff --git a/src/plugins/platforms/webgl/qwebglintegration.cpp b/src/plugins/platforms/webgl/qwebglintegration.cpp
index 1b4214a..58e4be0 100644
--- a/src/plugins/platforms/webgl/qwebglintegration.cpp
+++ b/src/plugins/platforms/webgl/qwebglintegration.cpp
@@ -70,12 +70,13 @@ QWebGLIntegrationPrivate *QWebGLIntegrationPrivate::instance()
return static_cast<QWebGLIntegration *>(platformIntegration)->d_ptr.data();
}
-QWebGLIntegration::QWebGLIntegration(quint16 port) :
+QWebGLIntegration::QWebGLIntegration(quint16 port, quint16 wssport) :
d_ptr(new QWebGLIntegrationPrivate)
{
Q_D(QWebGLIntegration);
d->q_ptr = this;
d->httpPort = port;
+ d->wssPort = wssport;
d->touchDevice = new QTouchDevice;
d->touchDevice->setName("EmulatedTouchDevice");
d->touchDevice->setType(QTouchDevice::TouchScreen);
@@ -110,9 +111,9 @@ void QWebGLIntegration::initialize()
d->inputContext = QPlatformInputContextFactory::create();
d->screen = new QWebGLScreen;
- screenAdded(d->screen, true);
+ QWindowSystemInterface::handleScreenAdded(d->screen, true);
- d->webSocketServer = new QWebGLWebSocketServer;
+ d->webSocketServer = new QWebGLWebSocketServer(d->wssPort);
d->httpServer = new QWebGLHttpServer(d->webSocketServer, this);
bool ok = d->httpServer->listen(QHostAddress::Any, d->httpPort);
if (!ok) {
@@ -138,7 +139,7 @@ void QWebGLIntegration::destroy()
foreach (QWindow *w, qGuiApp->topLevelWindows())
w->destroy();
- destroyScreen(d->screen);
+ QWindowSystemInterface::handleScreenRemoved(d->screen);
d->screen = nullptr;
@@ -335,7 +336,6 @@ void QWebGLIntegrationPrivate::clientConnected(QWebSocket *socket,
const double physicalWidth,
const double physicalHeight)
{
- Q_Q(QWebGLIntegration);
qCDebug(lcWebGL, "%p, Size: %dx%d. Physical Size: %fx%f",
socket, width, height, physicalWidth, physicalHeight);
QWebGLIntegrationPrivate::ClientData client;
@@ -345,7 +345,7 @@ void QWebGLIntegrationPrivate::clientConnected(QWebSocket *socket,
clients.mutex.lock();
clients.list.append(client);
clients.mutex.unlock();
- q->screenAdded(client.platformScreen, true);
+ QWindowSystemInterface::handleScreenAdded(client.platformScreen, true);
connectNextClient();
}
diff --git a/src/plugins/platforms/webgl/qwebglintegration.h b/src/plugins/platforms/webgl/qwebglintegration.h
index 856ccde..f3e22df 100644
--- a/src/plugins/platforms/webgl/qwebglintegration.h
+++ b/src/plugins/platforms/webgl/qwebglintegration.h
@@ -45,7 +45,7 @@ Q_DECLARE_LOGGING_CATEGORY(lcWebGL)
class QWebGLIntegration : public QPlatformIntegration, public QPlatformNativeInterface
{
public:
- QWebGLIntegration(quint16 port);
+ QWebGLIntegration(quint16 port, quint16 wssport);
~QWebGLIntegration();
static QWebGLIntegration *instance();
diff --git a/src/plugins/platforms/webgl/qwebglintegration_p.h b/src/plugins/platforms/webgl/qwebglintegration_p.h
index 06f19fc..106667e 100644
--- a/src/plugins/platforms/webgl/qwebglintegration_p.h
+++ b/src/plugins/platforms/webgl/qwebglintegration_p.h
@@ -71,6 +71,7 @@ public:
mutable QPlatformInputContext *inputContext = nullptr;
quint16 httpPort = 0;
+ quint16 wssPort = 0;
#if defined(Q_OS_WIN)
mutable QWindowsFontDatabase fontDatabase;
#elif defined(Q_OS_MACOS)
diff --git a/src/plugins/platforms/webgl/qwebglmain.cpp b/src/plugins/platforms/webgl/qwebglmain.cpp
index 6c9c324..ec3e8e5 100644
--- a/src/plugins/platforms/webgl/qwebglmain.cpp
+++ b/src/plugins/platforms/webgl/qwebglmain.cpp
@@ -47,6 +47,8 @@ QPlatformIntegration* QWebGLIntegrationPlugin::create(const QString& system,
const QStringList& paramList)
{
quint16 port = 8080;
+ quint16 wssport = 0;
+
if (!paramList.isEmpty()) {
for (const QString &parameter : qAsConst(paramList)) {
const QStringList parts = parameter.split('=');
@@ -61,13 +63,23 @@ QPlatformIntegration* QWebGLIntegrationPlugin::create(const QString& system,
qCCritical(lcWebGL, "Invalid port number");
return nullptr;
}
- }
- if (parts.first() == QStringLiteral("noloadingscreen"))
+ } else if (parts.first() == QStringLiteral("wsserverport")) {
+ if (parts.size() != 2) {
+ qCCritical(lcWebGL, "Websocket server port specified with no value");
+ return nullptr;
+ }
+ bool ok;
+ wssport = parts.last().toUShort(&ok);
+ if (!ok) {
+ qCCritical(lcWebGL, "Invalid websocket port number");
+ return nullptr;
+ }
+ } else if (parts.first() == QStringLiteral("noloadingscreen"))
qputenv("QT_WEBGL_LOADINGSCREEN", "0");
}
}
if (!system.compare(QLatin1String("webgl"), Qt::CaseInsensitive))
- return new QWebGLIntegration(port);
+ return new QWebGLIntegration(port, wssport);
return nullptr;
}
diff --git a/src/plugins/platforms/webgl/qwebglwebsocketserver.cpp b/src/plugins/platforms/webgl/qwebglwebsocketserver.cpp
index dfeaa58..c7fab3b 100644
--- a/src/plugins/platforms/webgl/qwebglwebsocketserver.cpp
+++ b/src/plugins/platforms/webgl/qwebglwebsocketserver.cpp
@@ -70,12 +70,15 @@ class QWebGLWebSocketServerPrivate
{
public:
QWebSocketServer *server = nullptr;
+ quint16 initialPort = 0;
};
-QWebGLWebSocketServer::QWebGLWebSocketServer(QObject *parent) :
+QWebGLWebSocketServer::QWebGLWebSocketServer(quint16 port, QObject *parent) :
QObject(parent),
d_ptr(new QWebGLWebSocketServerPrivate)
-{}
+{
+ d_ptr->initialPort = port;
+}
QWebGLWebSocketServer::~QWebGLWebSocketServer()
{}
@@ -120,7 +123,7 @@ void QWebGLWebSocketServer::create()
#endif
QWebSocketServer::NonSecureMode);
}
- if (d->server->listen(hostAddress, url.port(0))) {
+ if (d->server->listen(hostAddress, url.port(d->initialPort))) {
connect(d->server, &QWebSocketServer::newConnection,
this, &QWebGLWebSocketServer::onNewConnection);
} else {
diff --git a/src/plugins/platforms/webgl/qwebglwebsocketserver.h b/src/plugins/platforms/webgl/qwebglwebsocketserver.h
index f2bbea0..9330ec0 100644
--- a/src/plugins/platforms/webgl/qwebglwebsocketserver.h
+++ b/src/plugins/platforms/webgl/qwebglwebsocketserver.h
@@ -55,7 +55,7 @@ public:
ChangeTitle
};
- QWebGLWebSocketServer(QObject *parent = nullptr);
+ QWebGLWebSocketServer(quint16 port, QObject *parent = nullptr);
~QWebGLWebSocketServer() override;
quint16 port() const;