aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/shared
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-09-03 15:15:53 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-05 11:03:54 +0000
commita0d77ff082b6a5aa02a36f5a82649c45c0dcd265 (patch)
tree7c711e3311612d1d8633d7af503a29f81cb49c45 /tests/auto/shared
parent28daf8cc73c6ba51bcdda3079d73c2db7919fc2a (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/shared')
-rw-r--r--tests/auto/shared/visualtestutil.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/shared/visualtestutil.h b/tests/auto/shared/visualtestutil.h
index c1cc9c7d..c67e5bdc 100644
--- a/tests/auto/shared/visualtestutil.h
+++ b/tests/auto/shared/visualtestutil.h
@@ -118,9 +118,10 @@ namespace QQuickVisualTestUtil
component.loadUrl(testCase->testFileUrl(testFilePath));
QObject *rootObject = component.create();
cleanup.reset(rootObject);
- QVERIFY2(rootObject, qPrintable(QString::fromLatin1("Failed to create ApplicationWindow: %1").arg(component.errorString())));
+ QVERIFY2(rootObject, qPrintable(QString::fromLatin1("Failed to create window: %1").arg(component.errorString())));
- window = qobject_cast<QQuickApplicationWindow*>(rootObject);
+ window = qobject_cast<QQuickWindow*>(rootObject);
+ appWindow = qobject_cast<QQuickApplicationWindow*>(rootObject);
QVERIFY(window);
QVERIFY(!window->isVisible());
}
@@ -128,7 +129,8 @@ namespace QQuickVisualTestUtil
QQmlEngine engine;
QQmlComponent component;
QScopedPointer<QObject> cleanup;
- QQuickApplicationWindow *window;
+ QQuickApplicationWindow *appWindow;
+ QQuickWindow *window;
};
}