From 974643829f677247a8b06aba563a28714b48f1a9 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Thu, 18 Feb 2016 13:28:59 +0100 Subject: 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 --- tests/auto/quick/examples/tst_examples.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'tests/auto/quick/examples/tst_examples.cpp') 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 object(component.beginCreate(engine.rootContext())); + QQuickWindow *window = qobject_cast(object.data()); QQuickItem *root = qobject_cast(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) -- cgit v1.2.3