78cdd9a64d
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> |
||
---|---|---|
.. | ||
image | ||
itemmodels | ||
kernel | ||
math3d | ||
painting | ||
platform | ||
qopengl | ||
qopenglconfig | ||
qvulkan | ||
rhi | ||
text | ||
util | ||
CMakeLists.txt |