summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocketserver_p.h
diff options
context:
space:
mode:
authorMilian Wolff <mail@milianw.de>2014-02-06 17:30:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-06 20:17:10 +0100
commit6e7f54a014c43dcd6e32e8288415808623e306f4 (patch)
tree660a396149c93da25299ceb2e52d10f420e22d64 /src/websockets/qwebsocketserver_p.h
parent95655e87913556e69bdda4a9b3140da4602031e4 (diff)
downloadqtwebsockets-6e7f54a014c43dcd6e32e8288415808623e306f4.tar.gz
Do not access QObject API before its private data is initialized.
Inside the ctor of the private data, the QObject has not yet been associated with the data. Thus, accessing it indirectly i.e. to setup private signal/slot connections, will trigger crashes. Now we delay accessing this API and call an init() function manually in the parent QObject-inheriting class. Change-Id: I2c3ce7335c54d42af6bce87de867ee0ef197efc6 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src/websockets/qwebsocketserver_p.h')
-rw-r--r--src/websockets/qwebsocketserver_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/websockets/qwebsocketserver_p.h b/src/websockets/qwebsocketserver_p.h
index a9aa880..c4afd3d 100644
--- a/src/websockets/qwebsocketserver_p.h
+++ b/src/websockets/qwebsocketserver_p.h
@@ -85,6 +85,7 @@ public:
QWebSocketServer * const pWebSocketServer);
virtual ~QWebSocketServerPrivate();
+ void init();
void close();
QString errorString() const;
bool hasPendingConnections() const;