Do not query for QQmlComponent::Loading on remoteCursorDelegate: when a new
connection is established to the test http server, it will setup a single
shot QTimer with a 500ms timeout that will trigger the reply to be sent
back, making the call to sendDelayedItem() obsolete and reduntant. Also, it
means that in some platforms, data will arrive back to the component before
the check for QQmlComponent::Loading is executed, causing the test to fail
since at this point the status will already be QQmlComponent::Ready instead.
Change-Id: I30adeed2a669d5f6618f56d8a023fe7eaea16bc0
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
void tst_qquicktextinput::remoteCursorDelegate()
{
- QSKIP("This test is unstable");
TestHTTPServer server(SERVER_PORT);
server.serveDirectory(dataDirectory(), TestHTTPServer::Delay);
textInputObject->setFocus(true);
QVERIFY(textInputObject->isCursorVisible());
- QCOMPARE(component.status(), QQmlComponent::Loading);
- QVERIFY(!textInputObject->findChild<QQuickItem*>("cursorInstance"));
- server.sendDelayedItem();
-
// Wait for component to load.
QTRY_COMPARE(component.status(), QQmlComponent::Ready);
QVERIFY(textInputObject->findChild<QQuickItem*>("cursorInstance"));