From 12e8ad4304f156a9277f2016e86697af18a09d85 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Fri, 25 Sep 2009 10:12:53 +0300 Subject: Fixed qdialogbuttonbox test compilation for Symbian Reviewed-by: Jason Barron --- .../auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp | 22 ++++++++++++++++++---- 1 file 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 #include #include +#include #include #include @@ -721,15 +722,28 @@ void tst_QDialogButtonBox::testS60SoftKeys() QDialogButtonBox buttonBox(&dialog); buttonBox.setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); dialog.show(); - QList softKeys = dialog.softKeys(); - QCOMPARE( softKeys.count(), 2); + + int softkeyCount = 0; + QList 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 actions2 = dialog2.actions(); + foreach (QAction *action, actions2) { + if (action->softKeyRole() != QAction::NoSoftKey) + softkeyCount2++; + } + QCOMPARE( softkeyCount2, 1); + #else QSKIP("S60-specific test", SkipAll ); #endif -- cgit v0.12