aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-03 18:15:53 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-03 18:15:55 +0100
commita79d616501f028183c154f175ec3ed0fa45ffd85 (patch)
tree1d4290d0e61db71571dcec2d250f4d5d07ef2c5f /tests/auto/quick
parent9e77d6c31b406e5941a2d287f3c8842954815db4 (diff)
parent3b7a8d9d5e214a88f5855800e7bf54da4425d7b9 (diff)
Merge remote-tracking branch 'origin/release' into stable
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 984881c8da..b09f80a634 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -304,6 +304,7 @@ private slots:
void qmlCreation();
void clearColor();
+ void defaultState();
void grab_data();
void grab();
@@ -955,6 +956,25 @@ void tst_qquickwindow::clearColor()
QCOMPARE(window->color(), QColor(Qt::blue));
}
+void tst_qquickwindow::defaultState()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick 2.0; import QtQuick.Window 2.1; Window { }", QUrl());
+ QObject *created = component.create();
+ QScopedPointer<QObject> cleanup(created);
+ QVERIFY(created);
+
+ QQuickWindow *qmlWindow = qobject_cast<QQuickWindow*>(created);
+ QVERIFY(qmlWindow);
+
+ QQuickWindow cppWindow;
+ cppWindow.show();
+ QTest::qWaitForWindowExposed(&cppWindow);
+
+ QCOMPARE(qmlWindow->windowState(), cppWindow.windowState());
+}
+
void tst_qquickwindow::grab_data()
{
QTest::addColumn<bool>("visible");