Doc: Fix readString() and readByteArray() code snippets
Both of these functions return a StringResult, which has no StringResult::code member. Instead, use the existing StringResult::status member. Fixes: QTBUG-122254 Pick-to: 6.6 6.5 6.2 Change-Id: I0b9bfa1fc9a30e9c542ab90f3d8f4243bdeda762 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 57388179a41a169d4f6d65a385f605af31722bf2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6816da00a9
commit
cd664a7f39
@ -271,12 +271,12 @@ using namespace Qt::StringLiterals;
|
||||
{
|
||||
QString result;
|
||||
auto r = reader.readString();
|
||||
while (r.code == QCborStreamReader::Ok) {
|
||||
while (r.status == QCborStreamReader::Ok) {
|
||||
result += r.data;
|
||||
r = reader.readString();
|
||||
}
|
||||
|
||||
if (r.code == QCborStreamReader::Error) {
|
||||
if (r.status == QCborStreamReader::Error) {
|
||||
// handle error condition
|
||||
result.clear();
|
||||
}
|
||||
@ -289,12 +289,12 @@ using namespace Qt::StringLiterals;
|
||||
{
|
||||
QBytearray result;
|
||||
auto r = reader.readBytearray();
|
||||
while (r.code == QCborStreamReader::Ok) {
|
||||
while (r.status == QCborStreamReader::Ok) {
|
||||
result += r.data;
|
||||
r = reader.readByteArray();
|
||||
}
|
||||
|
||||
if (r.code == QCborStreamReader::Error) {
|
||||
if (r.status == QCborStreamReader::Error) {
|
||||
// handle error condition
|
||||
result.clear();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user