QCanvasPainter: Fix possible image cache key collisions
QImage::cacheKey() carries the detach counter in its low 32 bits, so
XORing the image flags there could produce the same key for different
image/flag combinations. Shift the cache key and place the flags in the
low byte instead.
Assisted-by: Claude Code
Pick-to: 6.12
Change-Id: I63a135fa232e7c8be0c81a6a912d3055a3b915ef
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
| commit | 6c94306c6670ddce34b427e190d7b2bed3aace7d |
| parent | 4b959e0a8d88512cbc5dd4cd9e0b707123797e63 |
| author | Kaj Grönholm <kaj.gronholm@qt.io> |
| committer | Kaj Grönholm <kaj.gronholm@qt.io> |
| commit time | Mon, 19 Oct 2026 10:46:15 +0000 |