aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-05-23 15:37:21 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-05-23 15:39:27 +0200
commitd2744ade327fe6b63bb80d6acd9c1cd7ae6e317f (patch)
treeb39a74a4fa41e0ac8da9a95e3acfaf5691b318a4 /tests
parentfd94d8e5673a5d5228aa2d38b605fde7a881332b (diff)
Remove QCoapClien's constructor for specifying a custom connection
Change-Id: I5b51c71ab11cbce5755a69c58f34bfa5e7cd5385 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qcoapclient/tst_qcoapclient.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/qcoapclient/tst_qcoapclient.cpp b/tests/auto/qcoapclient/tst_qcoapclient.cpp
index 6f66346..0af3bee 100644
--- a/tests/auto/qcoapclient/tst_qcoapclient.cpp
+++ b/tests/auto/qcoapclient/tst_qcoapclient.cpp
@@ -108,9 +108,11 @@ private:
class QCoapClientForSocketErrorTests : public QCoapClient
{
public:
- QCoapClientForSocketErrorTests() :
- QCoapClient(new QCoapQUdpConnectionSocketTests)
- {}
+ QCoapClientForSocketErrorTests()
+ {
+ QCoapClientPrivate *privateClient = static_cast<QCoapClientPrivate *>(d_func());
+ privateClient->setConnection(new QCoapQUdpConnectionSocketTests());
+ }
QCoapQUdpConnection *connection()
{
@@ -162,9 +164,11 @@ public:
class QCoapClientForMulticastTests : public QCoapClient
{
public:
- QCoapClientForMulticastTests() :
- QCoapClient(new QCoapConnectionMulticastTests)
- {}
+ QCoapClientForMulticastTests()
+ {
+ QCoapClientPrivate *privateClient = static_cast<QCoapClientPrivate *>(d_func());
+ privateClient->setConnection(new QCoapConnectionMulticastTests());
+ }
QCoapConnection *connection()
{