diff options
author | Juha Vuolle <[email protected]> | 2024-01-05 05:58:53 +0200 |
---|---|---|
committer | Juha Vuolle <[email protected]> | 2024-01-12 06:37:11 +0200 |
commit | 1702a37a3955f449210fe3874cfcd35bb08417ad (patch) | |
tree | bd58357c8dde7712313ada0f973e92800fa83969 /src/network/doc/snippets/code | |
parent | bba26d72207304e02098d1436232357dd452de2a (diff) |
Change QRestReply json return type to QJsonDocument
The json return type and function naming has gone back
and forth. Let's go with QJsonDocument after all, and add new
overloads in future if necessary.
Pick-to: 6.7
Task-number: QTBUG-119002
Change-Id: I3f9de0e6cba7d5c52d016d252d65b81f345af050
Reviewed-by: Marc Mutz <[email protected]>
Diffstat (limited to 'src/network/doc/snippets/code')
-rw-r--r-- | src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp b/src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp index fcc8dbaef52..4ef077d0c26 100644 --- a/src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp +++ b/src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp @@ -26,7 +26,7 @@ manager->post(request, myJson, this, [this](QRestReply *reply) { if (!reply->isSuccess()) { // ... } - if (std::optional<QJsonObject> json = reply->json()) { + if (std::optional json = reply->json()) { // use *json } }); @@ -37,7 +37,7 @@ manager->post(request, myJson, this, [this](QRestReply *reply) { manager->get(request, this, [this](QRestReply *reply) { if (!reply->isSuccess()) // handle error - if (std::optional<QJsonObject> json = reply->json()) + if (std::optional json = reply->json()) // use *json }); //! [3] |