canvas->setSource(testFileUrl("flickable03.qml"));
canvas->show();
canvas->requestActivateWindow();
- QTest::qWaitForWindowShown(canvas);
+ QTest::qWaitForWindowActive(canvas);
QVERIFY(canvas->rootObject() != 0);
QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(canvas->rootObject());
view->show();
view->requestActivateWindow();
- QTest::qWaitForWindowShown(view);
+ QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
QVERIFY(view->isTopLevel());
view->show();
view->requestActivateWindow();
- QTest::qWaitForWindowShown(view);
+ QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
QVERIFY(item1->hasActiveFocus() == true);
view->show();
view->requestActivateWindow();
- QTest::qWaitForWindowShown(view);
+ QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
QVERIFY(item0->hasActiveFocus() == true);
view->show();
view->requestActivateWindow();
- QTest::qWaitForWindowShown(view);
+ QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
QVERIFY(item0->hasActiveFocus() == true);
view->show();
view->requestActivateWindow();
- QTest::qWaitForWindowShown(view);
+ QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
QVERIFY(view->rootObject()->property("focus1") == false);
view->show();
view->requestActivateWindow();
- QTest::qWaitForWindowShown(view);
+ QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
QVariant blue(QColor("blue"));
canvas->rootContext()->setContextProperty("testModel", &model);
canvas->setSource(testFileUrl("gridview1.qml"));
canvas->show();
- qApp->processEvents();
+ QTest::qWaitForWindowActive(canvas);
QQuickGridView *gridview = findItem<QQuickGridView>(canvas->rootObject(), "grid");
QTRY_VERIFY(gridview != 0);
QTRY_COMPARE(QQuickItemPrivate::get(gridview)->polishScheduled, false);
canvas->requestActivateWindow();
+ QTest::qWaitForWindowActive(canvas);
QTRY_VERIFY(qGuiApp->focusWindow() == canvas);
QCOMPARE(gridview->currentIndex(), 0);
void ensureFocus(QWindow *w) {
w->show();
w->requestActivateWindow();
- qApp->processEvents();
+ QTest::qWaitForWindowActive(w);
}
};
view.show();
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowActive(&view);
QImage fb = view.grabFrameBuffer();
uint pixel = fb.pixel(0, 0);
canvas->setSource(testFileUrl("listview-enforcerange-nohighlight.qml"));
canvas->show();
- qApp->processEvents();
+ QTest::qWaitForWindowExposed(canvas);
QQuickListView *listview = findItem<QQuickListView>(canvas->rootObject(), "list");
QTRY_VERIFY(listview != 0);
canvas->rootContext()->setContextProperty("testObject", testObject);
canvas->setSource(testFileUrl("listviewtest.qml"));
canvas->show();
- qApp->processEvents();
+ QTest::qWaitForWindowActive(canvas);
QQuickListView *listview = findItem<QQuickListView>(canvas->rootObject(), "list");
QTRY_VERIFY(listview != 0);
QTRY_COMPARE(QQuickItemPrivate::get(listview)->polishScheduled, false);
canvas->requestActivateWindow();
+ QTest::qWaitForWindowActive(canvas);
QTRY_VERIFY(qGuiApp->focusWindow() == canvas);
QCOMPARE(listview->currentIndex(), 0);
canvas->setSource(testFileUrl("parentBinding.qml"));
canvas->show();
- qApp->processEvents();
+ QTest::qWaitForWindowExposed(canvas);
QQuickListView *listview = qobject_cast<QQuickListView*>(canvas->rootObject());
QVERIFY(listview != 0);
canvas.show();
canvas.requestActivateWindow();
- QTest::qWaitForWindowShown(&canvas);
+ QTest::qWaitForWindowActive(&canvas);
QTRY_COMPARE(&canvas, qGuiApp->focusWindow());
QVERIFY(canvas.rootObject() != 0);
QVERIFY(canvas.rootObject() != 0);
canvas.show();
canvas.requestActivateWindow();
- canvas.requestActivateWindow();
- QTest::qWaitForWindowShown(&canvas);
+ QTest::qWaitForWindowActive(&canvas);
QQuickTextEdit *texteditObject = qobject_cast<QQuickTextEdit *>(canvas.rootObject());
QVERIFY(texteditObject != 0);
QCOMPARE(spy.count(), 6);
view.requestActivateWindow();
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowActive(&view);
QCOMPARE(edit.isCursorVisible(), true);
QCOMPARE(spy.count(), 7);
textEdit->setParentItem(canvas.rootItem());
canvas.show();
canvas.requestActivateWindow();
- QTest::qWaitForWindowShown(&canvas);
+ QTest::qWaitForWindowActive(&canvas);
QTRY_COMPARE(QGuiApplication::focusWindow(), &canvas);
QVERIFY(!textEdit->canUndo());
canvas.show();
canvas.requestActivateWindow();
- QTest::qWaitForWindowShown(&canvas);
+ QTest::qWaitForWindowActive(&canvas);
QTRY_COMPARE(&canvas, qGuiApp->focusWindow());
canvas.show();
canvas.requestActivateWindow();
- QTest::qWaitForWindowShown(&canvas);
+ QTest::qWaitForWindowActive(&canvas);
QTRY_COMPARE(&canvas, qGuiApp->focusWindow());
QVERIFY(canvas.rootObject() != 0);
QQuickView canvas(testFileUrl("validators.qml"));
canvas.show();
canvas.requestActivateWindow();
+ QTest::qWaitForWindowActive(&canvas);
QVERIFY(canvas.rootObject() != 0);
QCOMPARE(spy.count(), 6);
view.requestActivateWindow();
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowActive(&view);
QCOMPARE(input.isCursorVisible(), true);
QCOMPARE(spy.count(), 7);
QQuickView view(QUrl::fromLocalFile(qmlfile));
view.show();
view.requestActivateWindow();
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowActive(&view);
QTRY_COMPARE(&view, qGuiApp->focusWindow());