diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-09-10 09:15:02 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-09-11 09:35:27 (GMT) |
commit | ed501bfc4a6510b70dc0bba17ab3da9921ab9f9f (patch) | |
tree | f3139751d9643c71ea3a047c2a75e0def9ea204b /tests/auto/qmenubar | |
parent | 5a5337879fa4bfeacc1fe11e4b617ba623f22273 (diff) | |
download | Qt-ed501bfc4a6510b70dc0bba17ab3da9921ab9f9f.zip Qt-ed501bfc4a6510b70dc0bba17ab3da9921ab9f9f.tar.gz Qt-ed501bfc4a6510b70dc0bba17ab3da9921ab9f9f.tar.bz2 |
Fix autotests on QMenuBar
We have mousemove events but we were missing the mouse press ones.
Diffstat (limited to 'tests/auto/qmenubar')
-rw-r--r-- | tests/auto/qmenubar/tst_qmenubar.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/qmenubar/tst_qmenubar.cpp b/tests/auto/qmenubar/tst_qmenubar.cpp index c74bbcb..07aa9f4 100644 --- a/tests/auto/qmenubar/tst_qmenubar.cpp +++ b/tests/auto/qmenubar/tst_qmenubar.cpp @@ -1545,22 +1545,27 @@ void tst_QMenuBar::task256322_highlight() win.show(); QTest::qWait(200); + QTest::mousePress(win.menuBar(), Qt::LeftButton, 0, win.menuBar()->actionGeometry(file).center()); QTest::mouseMove(win.menuBar(), win.menuBar()->actionGeometry(file).center()); - QTest::mouseClick(win.menuBar(), Qt::LeftButton, 0, win.menuBar()->actionGeometry(file).center()); + QTest::mouseRelease(win.menuBar(), Qt::LeftButton, 0, win.menuBar()->actionGeometry(file).center()); QTRY_VERIFY(menu.isVisible()); QVERIFY(!menu2.isVisible()); QCOMPARE(win.menuBar()->activeAction(), file); + QTest::mousePress(win.menuBar(), Qt::LeftButton, 0, win.menuBar()->actionGeometry(file2).center()); QTest::mouseMove(win.menuBar(), win.menuBar()->actionGeometry(file2).center()); QTRY_VERIFY(!menu.isVisible()); QVERIFY(menu2.isVisible()); QCOMPARE(win.menuBar()->activeAction(), file2); + QTest::mouseRelease(win.menuBar(), Qt::LeftButton, 0, win.menuBar()->actionGeometry(file2).center()); QPoint nothingCenter = win.menuBar()->actionGeometry(nothing).center(); + QTest::mousePress(win.menuBar(), Qt::LeftButton, 0, nothingCenter); QTest::mouseMove(win.menuBar(), nothingCenter); QTRY_VERIFY(!menu2.isVisible()); QVERIFY(!menu.isVisible()); QCOMPARE(win.menuBar()->activeAction(), nothing); + QTest::mouseRelease(win.menuBar(), Qt::LeftButton, 0, nothingCenter); } void tst_QMenuBar::menubarSizeHint() |