From 7d53e7998c3db64bde8e7990a23f02f4195a9a69 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 13 Oct 2017 12:08:47 +0200 Subject: [PATCH] don't qcompare with nullptr use QVERIFY(!pointer) instead, clang likes it more apparently --- src/wayland/autotests/client/test_xdg_foreign.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wayland/autotests/client/test_xdg_foreign.cpp b/src/wayland/autotests/client/test_xdg_foreign.cpp index 8f234b96ad..4c28614ba5 100644 --- a/src/wayland/autotests/client/test_xdg_foreign.cpp +++ b/src/wayland/autotests/client/test_xdg_foreign.cpp @@ -260,8 +260,8 @@ void TestForeign::testDeleteImported() QVERIFY(transientSpy.wait()); QCOMPARE(transientSpy.first().first().value(), m_childSurfaceInterface.data()); - QCOMPARE(transientSpy.first().at(1).value(), nullptr); - QCOMPARE(m_foreignInterface->transientFor(m_childSurfaceInterface), nullptr); + QVERIFY(!transientSpy.first().at(1).value()); + QVERIFY(!m_foreignInterface->transientFor(m_childSurfaceInterface)); } void TestForeign::testDeleteChildSurface() @@ -279,7 +279,7 @@ void TestForeign::testDeleteChildSurface() QSignalSpy surfaceDestroyedSpy(m_childSurfaceInterface, SIGNAL(destroyed())); QVERIFY(surfaceDestroyedSpy.wait()); - QCOMPARE(transientSpy.first().at(0).value(), nullptr); + QVERIFY(!transientSpy.first().at(0).value()); QCOMPARE(transientSpy.first().at(1).value(), m_exportedSurfaceInterface.data()); } @@ -299,8 +299,8 @@ void TestForeign::testDeleteParentSurface() QVERIFY(transientSpy.wait()); QCOMPARE(transientSpy.first().first().value(), m_childSurfaceInterface.data()); - QCOMPARE(transientSpy.first().at(1).value(), nullptr); - QCOMPARE(m_foreignInterface->transientFor(m_childSurfaceInterface), nullptr); + QVERIFY(!transientSpy.first().at(1).value()); + QVERIFY(!m_foreignInterface->transientFor(m_childSurfaceInterface)); } void TestForeign::testDeleteExported() @@ -318,8 +318,8 @@ void TestForeign::testDeleteExported() QVERIFY(destroyedSpy.wait()); QCOMPARE(transientSpy.first().first().value(), m_childSurfaceInterface.data()); - QCOMPARE(transientSpy.first().at(1).value(), nullptr); - QCOMPARE(m_foreignInterface->transientFor(m_childSurfaceInterface), nullptr); + QVERIFY(!transientSpy.first().at(1).value()); + QVERIFY(!m_foreignInterface->transientFor(m_childSurfaceInterface)); QVERIFY(!m_imported->isValid()); }