diff options
Diffstat (limited to 'tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp')
-rw-r--r-- | tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp b/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp index 947cb5d..ee8c295 100644 --- a/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp +++ b/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp @@ -40,18 +40,13 @@ #include <QtCoap/qcoaprequest.h> #include <private/qcoapqudpconnection_p.h> #include <private/qcoapinternalrequest_p.h> +#include <private/qcoaprequest_p.h> #include "../coapnetworksettings.h" #ifdef QT_BUILD_INTERNAL using namespace QtCoapNetworkSettings; -struct QCoapRequestForTest : public QCoapRequest -{ - QCoapRequestForTest(const QUrl &url) : QCoapRequest(url) {} - using QCoapRequest::setMethod; -}; - class tst_QCoapQUdpConnection : public QObject { Q_OBJECT @@ -186,10 +181,10 @@ void tst_QCoapQUdpConnection::sendRequest() QSignalSpy spySocketReadyRead(connection.socket(), &QUdpSocket::readyRead); QSignalSpy spyConnectionReadyRead(&connection, &QCoapQUdpConnection::readyRead); - QCoapRequestForTest request(protocol + host + path); + QCoapRequest request = + QCoapRequestPrivate::createRequest(QCoapRequest(protocol + host + path), method); request.setMessageId(24806); request.setToken(QByteArray("abcd")); - request.setMethod(method); QVERIFY(connection.socket() != nullptr); QCoapInternalRequest internalRequest(request); connection.sendRequest(internalRequest.toQByteArray(), host, port); |