summaryrefslogtreecommitdiffstats
path: root/tests/auto/qactiongroup/tst_qactiongroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qactiongroup/tst_qactiongroup.cpp')
-rw-r--r--tests/auto/qactiongroup/tst_qactiongroup.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/auto/qactiongroup/tst_qactiongroup.cpp b/tests/auto/qactiongroup/tst_qactiongroup.cpp
index c290941..2d215a0 100644
--- a/tests/auto/qactiongroup/tst_qactiongroup.cpp
+++ b/tests/auto/qactiongroup/tst_qactiongroup.cpp
@@ -226,6 +226,14 @@ void tst_QActionGroup::separators()
mw.show();
+#ifdef QT_SOFTKEYS_ENABLED
+ // Softkeys add extra "Select" and "Back" actions to menu by default.
+ // Two first actions will be Select and Back when softkeys are enabled
+ int numSoftkeyActions = 2;
+#else
+ int numSoftkeyActions = 0;
+#endif
+
QAction *action = new QAction(&actGroup);
action->setText("test one");
@@ -237,13 +245,13 @@ void tst_QActionGroup::separators()
while (it.hasNext())
menu.addAction(it.next());
- QCOMPARE((int)menu.actions().size(), 2);
+ QCOMPARE((int)menu.actions().size(), 2 + numSoftkeyActions);
it = QListIterator<QAction*>(actGroup.actions());
while (it.hasNext())
menu.removeAction(it.next());
- QCOMPARE((int)menu.actions().size(), 0);
+ QCOMPARE((int)menu.actions().size(), 0 + numSoftkeyActions);
action = new QAction(&actGroup);
action->setText("test two");
@@ -252,7 +260,7 @@ void tst_QActionGroup::separators()
while (it.hasNext())
menu.addAction(it.next());
- QCOMPARE((int)menu.actions().size(), 3);
+ QCOMPARE((int)menu.actions().size(), 3 + numSoftkeyActions);
}
void tst_QActionGroup::testActionInTwoQActionGroup()