summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2018-03-06 16:43:35 +0100
committerMaurice Kalinowski <maurice.kalinowski@qt.io>2018-03-07 07:35:08 +0000
commit539bc149f00361f3d76970eeab4557b6a2eb6bca (patch)
tree9709c30e3fd8626062ad718b12a331994d624c06
parent32d76b555cc9f327d8335c604829daa349cca0c0 (diff)
Fix memory leak in testsv5.11.0-beta2
The QTcpServer did not get deleted on destruction. Change-Id: I525b6d4602aaf23dde193ef2d0dc49bc30898741 Reviewed-by: Andrew O'Doherty <andrew.odoherty@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--tests/auto/qmqttclient/tst_qmqttclient.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qmqttclient/tst_qmqttclient.cpp b/tests/auto/qmqttclient/tst_qmqttclient.cpp
index 6c70007..e6cf055 100644
--- a/tests/auto/qmqttclient/tst_qmqttclient.cpp
+++ b/tests/auto/qmqttclient/tst_qmqttclient.cpp
@@ -395,7 +395,7 @@ class FakeServer : public QObject
Q_OBJECT
public:
FakeServer() {
- server = new QTcpServer();
+ server = new QTcpServer(this);
connect(server, &QTcpServer::newConnection, this, &FakeServer::createSocket);
server->listen(QHostAddress::Any, 5726);
}