diff options
author | Jan Arve Saether <[email protected]> | 2016-02-18 13:28:59 +0100 |
---|---|---|
committer | J-P Nurmi <[email protected]> | 2016-02-26 13:18:27 +0000 |
commit | 974643829f677247a8b06aba563a28714b48f1a9 (patch) | |
tree | 2e040aacedff10bb0f579081bbae21693fea01be /tests/auto/quick/examples/tst_examples.cpp | |
parent | fb2710a7f182ffb910f6b121e8bc125a4f61dcdf (diff) |
Move QtQuick.Layouts to qtdeclarative from qtquickcontrols
This is in order for it to be available without having to install
Qt Quick Controls
Change-Id: I3f0d0dc108829947cd189b7861944e556e00cef3
Reviewed-by: J-P Nurmi <[email protected]>
Diffstat (limited to 'tests/auto/quick/examples/tst_examples.cpp')
-rw-r--r-- | tests/auto/quick/examples/tst_examples.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index 240e8a791e..548b20a80a 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -291,7 +291,6 @@ void tst_examples::sgsnippets_data() void tst_examples::sgsnippets() { - QQuickWindow window; QFETCH(QString, file); @@ -301,19 +300,26 @@ void tst_examples::sgsnippets() QCOMPARE(component.status(), QQmlComponent::Ready); QScopedPointer<QObject> object(component.beginCreate(engine.rootContext())); + QQuickWindow *window = qobject_cast<QQuickWindow*>(object.data()); QQuickItem *root = qobject_cast<QQuickItem *>(object.data()); - if (!root) + if (!root && !window) { component.completeCreate(); - QVERIFY(root); + QVERIFY(false); + } + if (!window) + window = new QQuickWindow; - window.resize(240, 320); - window.show(); - QVERIFY(QTest::qWaitForWindowExposed(&window)); + window->resize(240, 320); + window->show(); + QVERIFY(QTest::qWaitForWindowExposed(window)); - root->setParentItem(window.contentItem()); + if (root) + root->setParentItem(window->contentItem()); component.completeCreate(); qApp->processEvents(); + if (root) + delete window; } QTEST_MAIN(tst_examples) |