diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-09-03 15:15:53 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-09-05 11:03:54 +0000 |
commit | a0d77ff082b6a5aa02a36f5a82649c45c0dcd265 (patch) | |
tree | 7c711e3311612d1d8633d7af503a29f81cb49c45 /tests/auto/drawer | |
parent | 28daf8cc73c6ba51bcdda3079d73c2db7919fc2a (diff) |
auto tests: allow using QQuickWindow with QQuickApplicationHelper
This allows us to run the relevant popup tests for both QQuickWindow
and QQuickApplicationWindow.
Change-Id: I14b6435afeeb8a6cf640d8c52ad1d9e1fae070b0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/drawer')
-rw-r--r-- | tests/auto/drawer/tst_drawer.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/drawer/tst_drawer.cpp b/tests/auto/drawer/tst_drawer.cpp index 3c128fbc..ffa1f896 100644 --- a/tests/auto/drawer/tst_drawer.cpp +++ b/tests/auto/drawer/tst_drawer.cpp @@ -86,12 +86,12 @@ void tst_Drawer::position() QQuickApplicationHelper helper(this, QStringLiteral("applicationwindow.qml")); - QQuickApplicationWindow *window = helper.window; + QQuickApplicationWindow *window = helper.appWindow; window->show(); window->requestActivate(); QVERIFY(QTest::qWaitForWindowActive(window)); - QQuickDrawer *drawer = helper.window->property("drawer").value<QQuickDrawer*>(); + QQuickDrawer *drawer = helper.appWindow->property("drawer").value<QQuickDrawer*>(); QVERIFY(drawer); drawer->setEdge(edge); @@ -131,12 +131,12 @@ void tst_Drawer::dragMargin() QQuickApplicationHelper helper(this, QStringLiteral("applicationwindow.qml")); - QQuickApplicationWindow *window = helper.window; + QQuickApplicationWindow *window = helper.appWindow; window->show(); window->requestActivate(); QVERIFY(QTest::qWaitForWindowActive(window)); - QQuickDrawer *drawer = helper.window->property("drawer").value<QQuickDrawer*>(); + QQuickDrawer *drawer = helper.appWindow->property("drawer").value<QQuickDrawer*>(); QVERIFY(drawer); drawer->setEdge(edge); drawer->setDragMargin(dragMargin); @@ -167,12 +167,12 @@ void tst_Drawer::reposition() { QQuickApplicationHelper helper(this, QStringLiteral("applicationwindow.qml")); - QQuickApplicationWindow *window = helper.window; + QQuickApplicationWindow *window = helper.appWindow; window->show(); window->requestActivate(); QVERIFY(QTest::qWaitForWindowActive(window)); - QQuickDrawer *drawer = helper.window->property("drawer").value<QQuickDrawer*>(); + QQuickDrawer *drawer = helper.appWindow->property("drawer").value<QQuickDrawer*>(); QVERIFY(drawer); drawer->setEdge(Qt::RightEdge); @@ -199,20 +199,20 @@ void tst_Drawer::hover() QFETCH(bool, modal); QQuickApplicationHelper helper(this, QStringLiteral("hover.qml")); - QQuickApplicationWindow *window = helper.window; + QQuickApplicationWindow *window = helper.appWindow; window->show(); window->requestActivate(); QVERIFY(QTest::qWaitForWindowActive(window)); - QQuickDrawer *drawer = helper.window->property("drawer").value<QQuickDrawer*>(); + QQuickDrawer *drawer = helper.appWindow->property("drawer").value<QQuickDrawer*>(); QVERIFY(drawer); drawer->setModal(modal); - QQuickButton *backgroundButton = helper.window->property("backgroundButton").value<QQuickButton*>(); + QQuickButton *backgroundButton = helper.appWindow->property("backgroundButton").value<QQuickButton*>(); QVERIFY(backgroundButton); backgroundButton->setHoverEnabled(true); - QQuickButton *drawerButton = helper.window->property("drawerButton").value<QQuickButton*>(); + QQuickButton *drawerButton = helper.appWindow->property("drawerButton").value<QQuickButton*>(); QVERIFY(drawerButton); drawerButton->setHoverEnabled(true); |