summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2012-11-02 14:41:27 +0100
committerJerome Pasion <jerome.pasion@digia.com>2012-11-02 14:41:27 +0100
commitc808dd27459e030fde0577feb8ba06e3bd465526 (patch)
tree4bf898dc4a88e2b03c9716f940638a2e01c6c0ce /tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
parentd9d8845d507a6bdbc9c9f24c0d9d86dca513461d (diff)
parent300534fc214f2547a63594ce0891e9a54c8f33ca (diff)
Merge branch 'master' of ssh://codereview.qt-project.org/qt/qtbase into newdocs
Diffstat (limited to 'tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp')
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
index 8c8f5b5d71..74b30039f8 100644
--- a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
+++ b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
@@ -107,9 +107,6 @@ private slots:
void testSignalOrder();
void testDefaultButton_data();
void testDefaultButton();
-#ifdef QT_SOFTKEYS_ENABLED
- void testSoftKeyReparenting();
-#endif
void task191642_default();
private:
@@ -714,51 +711,6 @@ void tst_QDialogButtonBox::testDefaultButton_data()
QTest::newRow("third accept explicit after add") << 0 << 2 << 2;
}
-static int softKeyCount(QWidget *widget)
-{
- int softkeyCount = 0;
-#ifndef QT_NO_ACTION
- QList<QAction *> actions = widget->actions();
- foreach (QAction *action, actions) {
- if (action->softKeyRole() != QAction::NoSoftKey)
- softkeyCount++;
- }
-#endif
- return softkeyCount;
-}
-
-#ifdef QT_SOFTKEYS_ENABLED
-void tst_QDialogButtonBox::testSoftKeyReparenting()
-{
- QDialog dialog;
- QDialogButtonBox *buttonBox = new QDialogButtonBox;
- buttonBox->addButton(QDialogButtonBox::Ok);
- buttonBox->addButton(QDialogButtonBox::Cancel);
-
-#ifndef QT_NO_ACTION
- QCOMPARE(softKeyCount(&dialog), 0);
- QCOMPARE(softKeyCount(buttonBox), 2);
-#endif
-
- // Were the softkeys re-parented correctly?
- dialog.setLayout(new QVBoxLayout);
- dialog.layout()->addWidget(buttonBox);
-#ifndef QT_NO_ACTION
- QCOMPARE(softKeyCount(&dialog), 2);
- QCOMPARE(softKeyCount(buttonBox), 0);
-#endif
-
- // Softkeys are only added to QDialog, not QWidget
- QWidget *nested = new QWidget;
- nested->setLayout(new QVBoxLayout);
- nested->layout()->addWidget(buttonBox);
-#ifndef QT_NO_ACTION
- QCOMPARE(softKeyCount(nested), 0);
- QCOMPARE(softKeyCount(buttonBox), 2);
-#endif
-}
-#endif
-
void tst_QDialogButtonBox::testDefaultButton()
{
QFETCH(int, whenToSetDefault);