Fix tst_QAbstractItemView::task200665_itemEntered

Moving the cursor is not synchronous.

Change-Id: I6b820af026585e1fcfef845cc712fa8f6812e941
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Tor Arne Vestbø 2017-07-22 16:30:39 +02:00
parent 4f599c5ea1
commit 185d87708b
1 changed files with 2 additions and 2 deletions

View File

@ -1238,8 +1238,8 @@ void tst_QAbstractItemView::task200665_itemEntered()
moveCursorAway(&view);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QCursor::setPos( view.geometry().center() );
QCoreApplication::processEvents();
QCursor::setPos(view.geometry().center());
QTRY_COMPARE(QCursor::pos(), view.geometry().center());
QSignalSpy spy(&view, SIGNAL(entered(QModelIndex)));
view.verticalScrollBar()->setValue(view.verticalScrollBar()->maximum());