[autotests] Fix PointerInputTest::testCursorImage()
ClosedPublic

Authored by zzag on Feb 28 2020, 5:07 PM.

Details

Summary
FAIL!  : KWin::PointerInputTest::testCursorImage() Compared QImages differ in device pixel ratio.
   Actual   (((p->cursorImage()))): 2
   Expected (blueScaled): 1
   Loc: [/home/vlad/Workspace/KDE/src/kde/workspace/kwin/autotests/integration/pointer_input.cpp(1058)]
Test Plan

The test passes.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Feb 28 2020, 5:07 PM
Restricted Application added a project: KWin. · View Herald TranscriptFeb 28 2020, 5:07 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Feb 28 2020, 5:07 PM
zzag updated this revision to Diff 76650.Feb 28 2020, 5:09 PM

Remove QCOMPARE(p->cursorImage().devicePixelRatio(), 2.0);

davidedmundson accepted this revision.Feb 28 2020, 5:13 PM
davidedmundson added a subscriber: davidedmundson.

QImage == must have changed since the time of writing

This revision is now accepted and ready to land.Feb 28 2020, 5:13 PM
zzag added a comment.Feb 28 2020, 5:15 PM

QImage == must have changed since the time of writing

Hmm, it seems like QImage::operator== doesn't care about the device pixel ratio.

https://code.woboq.org/qt5/qtbase/src/gui/image/qimage.cpp.html#_ZNK6QImageeqERKS_

This revision was automatically updated to reflect the committed changes.