qt5base-lts/tests/auto/corelib
Thiago Macieira 04dc959d49 Introduce Q{Json,Cbor}ValueConstRef
I screwed up when I wrote QCborValueRef by not having the ConstRef
type. The code worked, but it wasn't const-correct, allowing you to
write:

  const QCborArray &arr = something();
  *arr.begin() = QCborArray();

This mistake was brought over to QJsonValue in Qt 6.0, so it has to be
fixed for QJsonValue too. The actual fixes are in the next couple of
commits.

This change is believed to be binary-compatible: the Q{Json,Cbor}ValueRef
classes continue to have the exact same size, except that they're now
empty and have a new base class. They weren't trivial before this commit
doesn't change that.

[ChangeLog][Potentially Source-Incompatible Changes] The iterator
classes for Qt's JSON and CBOR containers (array and map/object) had a
const correctness issue which allowed a const_iterator to mutate the
container being iterated on, even if that container was itself const. Qt
6.4 has a fix for this, but will cause compilation issues where
QCborValueRef and QJsonValueRef were used where the correctness could be
violated. To keep code compiling with both 6.3 and 6.4, either change to
non-const iteration or replace the QxxxValueRef with a const QxxxValue
reference. This change is binary-compatible.

Change-Id: I5e52dc5b093c43a3b678fffd16b6063333765ae0
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-02-15 17:00:03 -08:00
..
animation tst_qanimationgroup: fix memleaks 2022-01-05 08:22:00 +01:00
global Exclude denormal test cases if system doesn't support it 2022-02-15 00:48:23 +02:00
io Cleanup tests that add test data to resources explicitly 2022-02-11 21:54:44 +01:00
itemmodels tst_QItemModel: fix memleaks 2022-01-05 08:22:00 +01:00
kernel Fix failures for tst_eventdispatcher on INTEGRITY 2022-02-15 18:20:40 +00:00
mimetypes Remove unused .qrc files 2022-01-17 23:17:01 +01:00
platform Android: Add runOnMainAndroidThread() under QNativeInterface 2021-05-26 23:24:11 +00:00
plugin QPluginLoader: report the right load hints 2022-02-03 03:26:40 +01:00
serialization Introduce Q{Json,Cbor}ValueConstRef 2022-02-15 17:00:03 -08:00
text Exclude denormal test cases if system doesn't support it 2022-02-15 00:48:23 +02:00
thread Activate tst_QFutureWatcher for Android 2022-02-15 00:42:29 +01:00
time Convert a table iteration to use ranged-for 2022-02-15 15:44:51 +01:00
tools Exclude denormal test cases if system doesn't support it 2022-02-15 00:48:23 +02:00
CMakeLists.txt Add tests for QAndroidApplication's sdkVersion and activity 2021-05-13 01:41:36 +03:00