diff options
Diffstat (limited to 'src/plugins/platforms/webgl/qwebglintegration.cpp')
-rw-r--r-- | src/plugins/platforms/webgl/qwebglintegration.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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(); } |