[Development] unified data model API in QtCore => thin wrapper proposal
Edward Welbourne
edward.welbourne at qt.io
Fri Oct 5 18:26:45 CEST 2018
Thiago Macieira (5 October 2018 17:35) asked me:
> Eddy: what happens in the new API if you write:
> const QCborArray array = { QCborArray{ 1 } };
> QCborValue v = array[0];
> v[0] = 2;
>
> Does that modify array?
No. It should only modify what v[0] reports, or a v.toArray()[0]
reports, after the assignment. My addition to the end of
tst_QCborValue::arrayDefaultInitialization() verifies exactly this with
the QVERIFY(a2.isEmpty()); that it adds, after such an assignment.
Eddy.
More information about the Development
mailing list