summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qdialogbuttonbox
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/widgets/qdialogbuttonbox')
-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);