summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qcborarray.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-09-14 14:59:21 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-11-01 15:02:46 +0000
commit779a73762de6addb2a2e3fee5b98d00d64101b92 (patch)
tree71f69f8a2b18f369ee7ed4bab385b8cc2c4b6ad4 /src/corelib/serialization/qcborarray.h
parentf09fc1f35294827245e74ced48274387d5ed346f (diff)
Fully support operator[] on QCborValue and QCborValueRef
Added operator[] to QCborValueRef and mutating operator[] both there and in QCborValue. If the value (referenced) is not a container, it is replaced with a map and a reference into the result is returned. If the value is an array and the key is a string, negative, or more than 0xffff, the array is first converted to a map. Change-Id: Ibbc9e480fb25eb3d05547c8a1b99e762b2a68b68 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/serialization/qcborarray.h')
-rw-r--r--src/corelib/serialization/qcborarray.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/serialization/qcborarray.h b/src/corelib/serialization/qcborarray.h
index d96342cfa6..e06544f245 100644
--- a/src/corelib/serialization/qcborarray.h
+++ b/src/corelib/serialization/qcborarray.h
@@ -272,6 +272,7 @@ private:
void detach(qsizetype reserve = 0);
friend QCborValue;
+ friend QCborValueRef;
explicit QCborArray(QCborContainerPrivate &dd) noexcept;
QExplicitlySharedDataPointer<QCborContainerPrivate> d;
};