autotests: Fix windowquadlist with Qt 6

In Qt 6, container.count() returns a qsizetype, on the other hand
expectedCount is int. That type difference makes QTEST panic.
remotes/origin/work/zamundaaa/fix-im-panel
Vlad Zahorodnii 3 years ago
parent a587e426f8
commit 495e127d07
  1. 6
      autotests/libkwineffects/windowquadlisttest.cpp

@ -84,8 +84,9 @@ void WindowQuadListTest::testMakeGrid()
{
QFETCH(KWin::WindowQuadList, orig);
QFETCH(int, quadSize);
QFETCH(int, expectedCount);
KWin::WindowQuadList actual = orig.makeGrid(quadSize);
QTEST(actual.count(), "expectedCount");
QCOMPARE(actual.count(), expectedCount);
QFETCH(KWin::WindowQuadList, expected);
for (auto it = actual.constBegin(); it != actual.constEnd(); ++it) {
@ -172,8 +173,9 @@ void WindowQuadListTest::testMakeRegularGrid()
QFETCH(KWin::WindowQuadList, orig);
QFETCH(int, xSubdivisions);
QFETCH(int, ySubdivisions);
QFETCH(int, expectedCount);
KWin::WindowQuadList actual = orig.makeRegularGrid(xSubdivisions, ySubdivisions);
QTEST(actual.count(), "expectedCount");
QCOMPARE(actual.count(), expectedCount);
QFETCH(KWin::WindowQuadList, expected);
for (auto it = actual.constBegin(); it != actual.constEnd(); ++it) {

Loading…
Cancel
Save