diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-05-18 03:05:08 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-05-18 03:05:08 +0200 |
commit | 02d7238391ae0addc6517759b10d01948b108cb3 (patch) | |
tree | b0c4d0497d73e1edde92c3eb4f1a72b726c39396 /src/coap/qcoapreply.cpp | |
parent | bad7ee3d4f329ad258b4ceacdb3818084208cf5f (diff) | |
parent | fd94d8e5673a5d5228aa2d38b605fde7a881332b (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I3ab43e890b692e3266522c4c3f8ea65499df2cbb
Diffstat (limited to 'src/coap/qcoapreply.cpp')
-rw-r--r-- | src/coap/qcoapreply.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/coap/qcoapreply.cpp b/src/coap/qcoapreply.cpp index 9122551..2880fd6 100644 --- a/src/coap/qcoapreply.cpp +++ b/src/coap/qcoapreply.cpp @@ -30,6 +30,8 @@ #include "qcoapreply_p.h" #include "qcoapinternalreply_p.h" +#include "qcoapnamespace_p.h" + #include <QtCore/qmath.h> #include <QtCore/qloggingcategory.h> @@ -161,7 +163,7 @@ void QCoapReplyPrivate::_q_setError(QtCoap::Error newError) */ void QCoapReplyPrivate::_q_setError(QtCoap::ResponseCode code) { - _q_setError(QtCoap::responseCodeError(code)); + _q_setError(QtCoap::errorForResponseCode(code)); } /*! @@ -181,7 +183,7 @@ void QCoapReplyPrivate::_q_setError(QtCoap::ResponseCode code) For \e Observe requests specifically, the notified() signal is emitted whenever a notification is received. - \sa QCoapClient, QCoapRequest, QCoapDiscoveryReply + \sa QCoapClient, QCoapRequest, QCoapResourceDiscoveryReply */ /*! @@ -241,15 +243,6 @@ void QCoapReplyPrivate::_q_setError(QtCoap::ResponseCode code) */ /*! - Constructs a new CoAP reply for the \a request and sets \a parent as - its parent. -*/ -QCoapReply::QCoapReply(const QCoapRequest &request, QObject *parent) : - QCoapReply(*new QCoapReplyPrivate(request), parent) -{ -} - -/*! \internal Constructs a new CoAP reply with \a dd as the d_ptr. This constructor must be used when subclassing internally @@ -425,6 +418,16 @@ void QCoapReply::abortRequest() emit finished(this); } +/*! + \internal + + Creates a new instance of QCoapReply and returns a pointer to it. +*/ +QCoapReply *QCoapReplyPrivate::createCoapReply(const QCoapRequest &request, QObject *parent) +{ + return new QCoapReply(*new QCoapReplyPrivate(request), parent); +} + QT_END_NAMESPACE #include "moc_qcoapreply.cpp" |