qt5base-lts/tests/auto/gui
Marc Mutz 78cdd9a64d QPixmapCache: deprecate replace()
The replace() implementation overwrites the passed Key key with a new
version, const_cast'ing away the const from the key passed by
reference-to-const. This is UB if the Key was originally declared
const.

Deprecate the function.

Also inline the const_cast, so compilers can readily detect the UB
even if users don't enable deprecation warnings. Due to the severity
of the issue (UB), immediate deprecation is warranted. There appear to
be no in-tree user of the API outside of tst_qpixmapcache.cpp.

[ChangeLog][Deprecation Notice][QtGui][QPixmapCache] The `replace(key,
pixmap)` function has been deprecated, because passing a `const Key`
to it results in undefined behavior. Use `remove(key, pixmap)`
followed by `key = insert(pixmap)` instead.

Pick-to: 6.6
Change-Id: Ic5060ce3271f2a1b6dc561da8716b452a2355d4c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-10 00:29:06 +02:00
..
image QPixmapCache: deprecate replace() 2023-06-10 00:29:06 +02:00
itemmodels Fix setting combo data with QSortFilterProxyModel 2023-04-19 20:26:24 +02:00
kernel Fix sending deferred delete events when posted before outermost loop 2023-06-09 16:31:35 +02:00
math3d Verify fix for manual get<I> calls for QVector<N>D 2023-03-22 15:59:10 +00:00
painting Port QPathClipper test away from home-grown QCOMPARE 2023-03-05 06:00:18 +01:00
platform Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qopengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qopenglconfig tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qvulkan Android: SKIP cases failing on Android 12 CI with 16GB RAM 2023-02-20 20:10:48 +02:00
rhi rhi: vulkan: expose the instance in the nativeHandles query 2023-05-30 10:29:51 +02:00
text Implement color role AccentColor in QStyleSheetStyle and QCssParser 2023-05-22 14:45:26 +00:00
util Doc fix in QIntValidator::validate() and comment on a test 2023-03-03 23:19:23 +00:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00