tst_qwindowcontainer: Convert some QVERIFYs to QCOMPAREs
So when they fail it's easier to figure out why. Change-Id: I7e76a6e0b8076ede30a6bb9049a031063c569dfc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This commit is contained in:
parent
037125ee4a
commit
74805930d1
@ -193,7 +193,7 @@ void tst_QWindowContainer::testActivation()
|
|||||||
QVERIFY(QTest::qWaitForWindowExposed(&root));
|
QVERIFY(QTest::qWaitForWindowExposed(&root));
|
||||||
|
|
||||||
QVERIFY(QTest::qWaitForWindowActive(root.windowHandle()));
|
QVERIFY(QTest::qWaitForWindowActive(root.windowHandle()));
|
||||||
QVERIFY(QGuiApplication::focusWindow() == root.windowHandle());
|
QCOMPARE(QGuiApplication::focusWindow(), root.windowHandle());
|
||||||
|
|
||||||
// Verify that all states in the root widget indicate it is active
|
// Verify that all states in the root widget indicate it is active
|
||||||
QVERIFY(root.windowHandle()->isActive());
|
QVERIFY(root.windowHandle()->isActive());
|
||||||
@ -207,7 +207,7 @@ void tst_QWindowContainer::testActivation()
|
|||||||
QTest::qWait(100);
|
QTest::qWait(100);
|
||||||
|
|
||||||
window->requestActivate();
|
window->requestActivate();
|
||||||
QTRY_VERIFY(QGuiApplication::focusWindow() == window);
|
QTRY_COMPARE(QGuiApplication::focusWindow(), window);
|
||||||
|
|
||||||
// Verify that all states in the root widget still indicate it is active
|
// Verify that all states in the root widget still indicate it is active
|
||||||
QVERIFY(root.windowHandle()->isActive());
|
QVERIFY(root.windowHandle()->isActive());
|
||||||
@ -303,7 +303,7 @@ void tst_QWindowContainer::testDockWidget()
|
|||||||
|
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(&mainWindow));
|
QVERIFY(QTest::qWaitForWindowExposed(&mainWindow));
|
||||||
QVERIFY(window->parent() == mainWindow.window()->windowHandle());
|
QCOMPARE(window->parent(), mainWindow.window()->windowHandle());
|
||||||
|
|
||||||
QTest::qWait(1000);
|
QTest::qWait(1000);
|
||||||
dock->setFloating(true);
|
dock->setFloating(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user