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.7 6.6 6.5 6.2 Change-Id: I0b9bfa1fc9a30e9c542ab90f3d8f4243bdeda762 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
parent
026e1e3fdb
commit
57388179a4
|
|
@ -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…
Reference in New Issue