diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2012-10-22 13:48:59 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-29 20:27:27 +0100 |
commit | c360fbcd6c9276b8a3fa8a200fa489b7b69e3aaa (patch) | |
tree | ebbd6dffd5315bca9016209089f041c4e222db8b /tests/auto/widgets/widgets/qdialogbuttonbox | |
parent | 63e451194e9f736fe4e35abd6a2a68c507ec9f5f (diff) |
Do the actual removal of the Soft Keys API and related code
In addition to the actual removal of the softkeys API in QAction,
this commit removes some enums related to the softkeys feature:
Qt::WA_MergeSoftkeys
Qt::WA_MergeSoftkeysRecursively
It also removes some "zombie" enums:
Qt::WindowSoftkeysVisibleHint = 0x40000000,
Qt::WindowSoftkeysRespondHint = 0x80000000,
(The only implementation that used these were removed when
qapplication_s60.cpp and qwidget_s60.cpp were removed.)
Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto/widgets/widgets/qdialogbuttonbox')
-rw-r--r-- | tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp | 48 |
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); |