path: root/src/xml/doc
diff options
authorMarc Mutz <>2023-06-06 16:33:21 +0200
committerMarc Mutz <>2023-06-10 00:29:06 +0200
commit78cdd9a64dc0cd666e5c8daafa7477c29641420d (patch)
treeeb1aa4e19de43da12c613ae1dda87814f41ebd24 /src/xml/doc
parentc4635c0d5822d0e95ceca867fffb9ba86a2b7bfe (diff)
QPixmapCache: deprecate replace()HEADdev
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 <>
Diffstat (limited to 'src/xml/doc')
0 files changed, 0 insertions, 0 deletions