qt5base-lts/tests/auto/gui/image/qiconhighdpi
Morten Johan Sørvig 46a552583f Teach QPixmapIconEngine how to handle @Nx pixmaps
Bring QPixmapIconEngine on par with QIconLoaderEngine
when it comes to @Nx pixmap handling: Make the scale
factor a test parameter during icon lookup.

This allows storing e.g 16x16@1, 16x16@2, 16x16@3 versions
of a pixmap in the icon, and then having QIcon select
the correct one based on the target devicePixelRatio.

Extend the qiconhighdpi test to also cover QPixmapIconEngine,
via the addPixmap() API.

The corner cases of pixmap lookup can be much complicated.
QIconLoaderEngine and QPixmapIconEngine should ideally
have identical behavior in order to avoid surprises.

Change-Id: I17552cc61755bff9553c4a462e3983ac6759c13b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-11-08 19:49:53 +01:00
..
icons qt_findAtNxFile(): account for .9 (9-patch image) extensions 2017-06-24 21:24:53 +00:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qiconhighdpi.pro cmake: add gui/image tests 2019-10-23 07:56:08 +00:00
tst_qiconhighdpi.cpp Teach QPixmapIconEngine how to handle @Nx pixmaps 2020-11-08 19:49:53 +01:00
tst_qiconhighdpi.qrc qt_findAtNxFile(): account for .9 (9-patch image) extensions 2017-06-24 21:24:53 +00:00