diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-03 18:15:53 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-03 18:15:55 +0100 |
commit | a79d616501f028183c154f175ec3ed0fa45ffd85 (patch) | |
tree | 1d4290d0e61db71571dcec2d250f4d5d07ef2c5f /tests/auto | |
parent | 9e77d6c31b406e5941a2d287f3c8842954815db4 (diff) | |
parent | 3b7a8d9d5e214a88f5855800e7bf54da4425d7b9 (diff) |
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I894ad7b4888744833f487b481950c087fa960a5c
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 20 |
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"); |