diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-14 11:20:12 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-14 15:15:44 +0000 |
commit | c90feba464526c9d00ccc63c0f372963fffc8d21 (patch) | |
tree | 851e5b1997c113f83a12baa4d9f0942810aa4b6f /src/coap/qcoapclient.cpp | |
parent | e04667b55c2055200da93382dee44299293735a6 (diff) |
Forbid creation of QCoapReply and QCoapResourceDiscoveryReply objects
Replies are created internally, and pointers to created objects are
returned to the user. Users should not be able to create instances of
QCoapReply or QCoapResourceDiscoveryReply.
This change is based on the feedback from API review.
Change-Id: Ibd59c62fd19c4b312253d4c4621b195bf5816340
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/coap/qcoapclient.cpp')
-rw-r--r-- | src/coap/qcoapclient.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/coap/qcoapclient.cpp b/src/coap/qcoapclient.cpp index af09686..372128a 100644 --- a/src/coap/qcoapclient.cpp +++ b/src/coap/qcoapclient.cpp @@ -36,6 +36,7 @@ #include "qcoapsecurityconfiguration.h" #include "qcoapqudpconnection_p.h" #include "qcoaprequest_p.h" +#include "qcoapreply_p.h" #include <QtCore/qiodevice.h> #include <QtCore/qurl.h> #include <QtCore/qloggingcategory.h> @@ -514,7 +515,7 @@ QCoapReply *QCoapClientPrivate::sendRequest(const QCoapRequest &request) Q_Q(QCoapClient); // Prepare the reply - QCoapReply *reply = new QCoapReply(request, q); + QCoapReply *reply = QCoapReplyPrivate::createCoapReply(request, q); if (!send(reply)) { delete reply; |