path: root/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt
diff options
authorVolker Hilsheimer <>2021-11-30 16:04:45 +0100
committerVolker Hilsheimer <>2021-12-03 21:07:09 +0100
commit56bd1b76d2e81c58a80bf6b5d74219c6b1ab8499 (patch)
treec85e63bbd06317ff4d8bb5394448c55c78e0aab9 /tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt
parent98c2260c3b928868e4b682b0300074b3d70849ec (diff)
Don't change resolve mask when setting brush doesn't change palette
After 556511f9f39ddc887481e0cd5a877134ceb0da6b, which moved the resolve mask storage into the palette's d-pointer, modifying the resolve mask requires a detach. As of now, we only detached when setting a different brush, but always modified the resolve mask, which broke palettes that shared the d-pointer (likely the global default palette). However, detaching has negative side effects when styles set brushes on temporary palette objects and then use that palette object's cache key to build a cache of pixmaps. As each drawing would detach the palette (even if the palette doesn't change, which is likely), the cache key changes with each detach, and the cache would quickly increase in size. This was addressed in changes d7bcdc3a442b99c2caebd4cfd38de67e14090e05 and 1e75dcf2518e37a7b83d006a4e002f972615b43b. We can either detach and find other ways to address the issues from QTBUG-65475, or we can not change the resolve mask when the brush doesn't change and completely ignore the call. Since QFont ignores the setting of any attribute to a value that is identical to the current value, and since it's possible to force that the resolve-bit is set by calling setBrush twice with different brushes, ignoring the call seems like the better solution. [ChangeLog][QtGui][QPalette] Setting a brush on a palette that is identical to the current brush no longer sets the resolve mask bit for that particular role, so items using the palette will continue to inherit changes from parent items. Fixes: QTBUG-98762 Task-number: QTBUG-65475 Pick-to: 6.2 Change-Id: Ife0f934b6a066858408ef75b7bb7ab61193ceb47 Reviewed-by: Simon Hausmann <> Reviewed-by: Tor Arne Vestbø <> Reviewed-by: Lars Knoll <>
Diffstat (limited to 'tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions