diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-12 22:17:32 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-14 15:15:24 +0000 |
commit | 3d10238a8be9cecdf6850791d0520d17e33297a6 (patch) | |
tree | 046c34e413c0fdb81b4bd17b7b7136a7f53f69b9 /tests/auto/qcoaprequest/tst_qcoaprequest.cpp | |
parent | 04b0424b8cf1aae3e0d9e8496650ce3329872917 (diff) |
Improve the API of QCoapMessage
- Rename QCoapMessage::MessageType -> QCoapMessage::Type
- Rename option() -> optionAt()
- Rename removeAllOptions() -> clearOptions()
- Hide findOption(). option() is more convenient to use instead.
- Add a setOptions() method.
This change is based on the feedback from API review.
Change-Id: I2093a06ca09eebb95865a82e09d2aa2265379e5d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qcoaprequest/tst_qcoaprequest.cpp')
-rw-r--r-- | tests/auto/qcoaprequest/tst_qcoaprequest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qcoaprequest/tst_qcoaprequest.cpp b/tests/auto/qcoaprequest/tst_qcoaprequest.cpp index 9f66b98..592d4eb 100644 --- a/tests/auto/qcoaprequest/tst_qcoaprequest.cpp +++ b/tests/auto/qcoaprequest/tst_qcoaprequest.cpp @@ -160,7 +160,7 @@ void tst_QCoapRequest::copyAndDetach() a.setMessageId(3); a.setPayload("payload"); a.setToken("token"); - a.setType(QCoapMessage::MessageType::Acknowledgment); + a.setType(QCoapMessage::Type::Acknowledgment); a.setVersion(5); a.setMethod(QtCoap::Method::Delete); QUrl testUrl("coap://url:500/resource"); @@ -173,7 +173,7 @@ void tst_QCoapRequest::copyAndDetach() QVERIFY2(b.messageId() == 3, "Message not copied correctly"); QVERIFY2(b.payload() == "payload", "Message not copied correctly"); QVERIFY2(b.token() == "token", "Message not copied correctly"); - QVERIFY2(b.type() == QCoapMessage::MessageType::Acknowledgment, "Message not copied correctly"); + QVERIFY2(b.type() == QCoapMessage::Type::Acknowledgment, "Message not copied correctly"); QVERIFY2(b.version() == 5, "Message not copied correctly"); // Test the QCoapRequest copy |