My KWIN fork where I work on features like per-output virtual desktops
Find a file
Vlad Zahorodnii f321882177 autotests: Fix testWindowmanagement
Currently, testIcon fails because the actual and the expected pixmaps
have mismatching formats.

The root cause is that images with an alpha channel will loose the alpha
channel if they are converted to QPixmap using QPixmap::fromImage().

The >> stream operator for the QPixmap class will deserialize pixel data
in a temporary QImage and then use QPixmap::fromImage() to get a pixmap
object.

The >> stream operator for the QIcon class will delegate the task of
reading the icon from a QDataStream to QPixmapIconEngine, which uses the
>> stream operator under the hood to deserialize icon data.

In order to fix testIcon, this change constructs a dummy icon from a
pixmap object returned by QPixmap::fromImage().
2021-03-16 15:28:46 +02:00
src/wayland autotests: Fix testWindowmanagement 2021-03-16 15:28:46 +02:00