summaryrefslogtreecommitdiffstats
path: root/src/network/doc/snippets/code
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/doc/snippets/code')
-rw-r--r--src/network/doc/snippets/code/src_network_access_qrestaccessmanager.cpp4
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]