diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-13 08:27:15 (GMT) |
---|---|---|
committer | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-13 08:27:15 (GMT) |
commit | dacfd67ad35ed3edb079e9795088f852b98717e3 (patch) | |
tree | 46b73da24c7e454f01ba4d60e67acb9240d25341 /tests | |
parent | f6079b8407e20942a27f1fe40c4ce0e0a11d3320 (diff) | |
download | Qt-dacfd67ad35ed3edb079e9795088f852b98717e3.zip Qt-dacfd67ad35ed3edb079e9795088f852b98717e3.tar.gz Qt-dacfd67ad35ed3edb079e9795088f852b98717e3.tar.bz2 |
Stabilize tst_QGraphicsView::mouseTracking2 (on Windows).
Use QApplication::sendEvent directly instead of calling the static
sendMouseMove function, which also calls QTest::mouseMove. This test failed
with spy.count() being 2 instead of 1 (which is correct since we both use
QTest::mouseMove and QApplication::sendEvent).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 77ab977..9a5089b 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -3311,7 +3311,9 @@ void tst_QGraphicsView::mouseTracking2() EventSpy spy(&scene, QEvent::GraphicsSceneMouseMove); QCOMPARE(spy.count(), 0); - sendMouseMove(view.viewport(), view.viewport()->rect().center()); + QMouseEvent event(QEvent::MouseMove,view.viewport()->rect().center(), Qt::NoButton, + Qt::MouseButtons(Qt::NoButton), 0); + QApplication::sendEvent(view.viewport(), &event); QCOMPARE(spy.count(), 1); } |