summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmenu
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qmenu')
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index b06b247..878bbbe 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -425,8 +425,11 @@ void tst_QMenu::overrideMenuAction()
QSKIP("On Mac, we need to create native key events to test menu action activation", SkipAll);
#elif defined(Q_OS_WINCE)
QSKIP("On Windows CE, we need to create native key events to test menu action activation", SkipAll);
+#elif defined(Q_OS_SYMBIAN)
+ QSKIP("On Symbian OS, we need to create native key events to test menu action activation", SkipAll);
#endif
- QAction *aQuit = new QAction("Quit", &w);
+
+ QAction *aQuit = new QAction("Quit", &w);
aQuit->setShortcut(QKeySequence("Ctrl+X"));
m->addAction(aQuit);
@@ -443,7 +446,7 @@ void tst_QMenu::overrideMenuAction()
delete aFileMenu;
- //after the deletion of the override menu action,
+ //after the deletion of the override menu action,
//the menu should have its default menu action back
QCOMPARE(m->menuAction(), menuaction);
@@ -472,7 +475,7 @@ void tst_QMenu::statusTip()
QVERIFY(btn != NULL);
- //because showMenu calls QMenu::exec, we need to use a singleshot
+ //because showMenu calls QMenu::exec, we need to use a singleshot
//to continue the test
QTimer::singleShot(200,this, SLOT(onStatusTipTimer()));
btn->showMenu();
@@ -486,10 +489,10 @@ void tst_QMenu::onStatusTipTimer()
QVERIFY(menu != 0);
QVERIFY(menu->isVisible());
QTest::keyClick(menu, Qt::Key_Down);
-
+
//we store the statustip to press escape in any case
//otherwise, if the test fails it blocks (never gets out of QMenu::exec
- const QString st=statustip;
+ const QString st=statustip;
menu->close(); //goes out of the menu
@@ -554,10 +557,10 @@ void tst_QMenu::tearOff()
menu->popup(QPoint(0,0));
QTest::qWait(50);
QVERIFY(!menu->isTearOffMenuVisible());
-
+
QTest::mouseClick(menu, Qt::LeftButton, 0, QPoint(3, 3), 10);
QTest::qWait(100);
-
+
QVERIFY(menu->isTearOffMenuVisible());
QPointer<QMenu> torn = 0;
foreach (QWidget *w, QApplication::allWidgets()) {
@@ -640,7 +643,11 @@ void tst_QMenu::activeSubMenuPosition()
main->setActiveAction(menuAction);
sub->setActiveAction(subAction);
+#ifdef Q_OS_SYMBIAN
+ main->popup(QPoint(50,200));
+#else
main->popup(QPoint(200,200));
+#endif
QVERIFY(main->isVisible());
QCOMPARE(main->activeAction(), menuAction);