summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/webgl/qwebglintegration.cpp
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2018-01-30 12:26:54 +0100
committerJesus Fernandez <Jesus.Fernandez@qt.io>2018-02-15 11:29:53 +0000
commit961198b42104ea644580b14e763ec87bda0e966c (patch)
treeb836b56d1c2c33af50631090940eff0941c35c49 /src/plugins/platforms/webgl/qwebglintegration.cpp
parent5a39420de0bb981be83d988b93ebc70906a4296e (diff)
Show more information when the HTTP server fails to initialize
When the HTTP server fails to initialize a simple message was shown in the terminal. This patch adds the error string from the QTcpServer to give more information about the problem. Change-Id: Ic52d4a78991e1c5a20f2712ca6cbbdd0738d47e0 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/plugins/platforms/webgl/qwebglintegration.cpp')
-rw-r--r--src/plugins/platforms/webgl/qwebglintegration.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/webgl/qwebglintegration.cpp b/src/plugins/platforms/webgl/qwebglintegration.cpp
index 1db869e..679b389 100644
--- a/src/plugins/platforms/webgl/qwebglintegration.cpp
+++ b/src/plugins/platforms/webgl/qwebglintegration.cpp
@@ -115,8 +115,10 @@ void QWebGLIntegration::initialize()
d->webSocketServer = new QWebGLWebSocketServer;
d->httpServer = new QWebGLHttpServer(d->webSocketServer, this);
bool ok = d->httpServer->listen(QHostAddress::Any, d->httpPort);
- if (!ok)
- qFatal("QWebGLIntegration::initialize: Failed to initialize");
+ if (!ok) {
+ qFatal("QWebGLIntegration::initialize: Failed to initialize: %s",
+ qPrintable(d->httpServer->errorString()));
+ }
d->webSocketServerThread = new QThread(this);
d->webSocketServerThread->setObjectName("WebSocketServer");
d->webSocketServer->moveToThread(d->webSocketServerThread);