summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdialogbuttonbox
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-09-25 07:12:53 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-09-25 07:12:53 (GMT)
commit12e8ad4304f156a9277f2016e86697af18a09d85 (patch)
tree48760d6146abf25059529360fa916579b03fa003 /tests/auto/qdialogbuttonbox
parentfc4f4d283eb96e43d11c70a8f1ea206425321850 (diff)
downloadQt-12e8ad4304f156a9277f2016e86697af18a09d85.zip
Qt-12e8ad4304f156a9277f2016e86697af18a09d85.tar.gz
Qt-12e8ad4304f156a9277f2016e86697af18a09d85.tar.bz2
Fixed qdialogbuttonbox test compilation for Symbian
Reviewed-by: Jason Barron
Diffstat (limited to 'tests/auto/qdialogbuttonbox')
-rw-r--r--tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
index e8fc1f3..936ebf7 100644
--- a/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
+++ b/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
@@ -43,6 +43,7 @@
#include <QtGui/QStyle>
#include <QtGui/QLayout>
#include <QtGui/QDialog>
+#include <QtGui/QAction>
#include <qdialogbuttonbox.h>
#include <limits.h>
@@ -721,15 +722,28 @@ void tst_QDialogButtonBox::testS60SoftKeys()
QDialogButtonBox buttonBox(&dialog);
buttonBox.setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
dialog.show();
- QList<QAction*> softKeys = dialog.softKeys();
- QCOMPARE( softKeys.count(), 2);
+
+ int softkeyCount = 0;
+ QList<QAction *> actions = dialog.actions();
+ foreach (QAction *action, actions) {
+ if (action->softKeyRole() != QAction::NoSoftKey)
+ softkeyCount++;
+ }
+ QCOMPARE( softkeyCount, 2);
QDialog dialog2(0);
QDialogButtonBox buttonBox2(&dialog2);
buttonBox2.setStandardButtons(QDialogButtonBox::Cancel);
dialog2.show();
- softKeys = dialog2.softKeys();
- QCOMPARE( softKeys.count(), 1);
+
+ int softkeyCount2 = 0;
+ QList<QAction *> actions2 = dialog2.actions();
+ foreach (QAction *action, actions2) {
+ if (action->softKeyRole() != QAction::NoSoftKey)
+ softkeyCount2++;
+ }
+ QCOMPARE( softkeyCount2, 1);
+
#else
QSKIP("S60-specific test", SkipAll );
#endif