From 44f0d3ced0c315facca914aa2da430823f3b84e3 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Fri, 7 Sep 2018 14:25:19 +0300 Subject: [PATCH] [autotests] Compare booleans to booleans Summary: Compiler errors: 17:06:23 /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/testDataDevice.dir/test_datadevice.cpp.o: in function `TestDataDevice::testDrag()': 17:06:23 /home/jenkins/workspace/Frameworks kwayland kf5-qt5 SUSEQt5.9/autotests/client/test_datadevice.cpp:290: undefined reference to `bool QTest::qCompare(int const&, bool const&, char const*, char const*, char const*, int)' 17:06:23 /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/testDataDevice.dir/test_datadevice.cpp.o: in function `TestDataDevice::testDragInternally()': 17:06:23 /home/jenkins/workspace/Frameworks kwayland kf5-qt5 SUSEQt5.9/autotests/client/test_datadevice.cpp:369: undefined reference to `bool QTest::qCompare(int const&, bool const&, char const*, char const*, char const*, int)' Test Plan: Ran testDataDevice, still passes. Reviewers: #kwin, romangg, broulik Reviewed By: broulik Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D15330 --- src/wayland/autotests/client/test_datadevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/autotests/client/test_datadevice.cpp b/src/wayland/autotests/client/test_datadevice.cpp index 38f85f17cc..9c689b77b9 100644 --- a/src/wayland/autotests/client/test_datadevice.cpp +++ b/src/wayland/autotests/client/test_datadevice.cpp @@ -287,7 +287,7 @@ void TestDataDevice::testDrag() // finally start the drag dataDevice->startDrag(pointerButtonSerial, dataSource.data(), surface.data()); QCOMPARE(dragStartedSpy.wait(500), success); - QCOMPARE(dragStartedSpy.count(), success); + QCOMPARE(!dragStartedSpy.isEmpty(), success); QCOMPARE(deviceInterface->dragSource(), success ? sourceInterface : nullptr); QCOMPARE(deviceInterface->origin(), success ? surfaceInterface : nullptr); QVERIFY(!deviceInterface->icon()); @@ -366,7 +366,7 @@ void TestDataDevice::testDragInternally() // finally start the internal drag dataDevice->startDragInternally(pointerButtonSerial, surface.data(), iconSurface.data()); QCOMPARE(dragStartedSpy.wait(500), success); - QCOMPARE(dragStartedSpy.count(), success); + QCOMPARE(!dragStartedSpy.isEmpty(), success); QVERIFY(!deviceInterface->dragSource()); QCOMPARE(deviceInterface->origin(), success ? surfaceInterface : nullptr); QCOMPARE(deviceInterface->icon(), success ? iconSurfaceInterface : nullptr);