From 7232bc0e1c56dc95fe8affaff1155486cf84e0b7 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 5 Oct 2011 14:43:11 +1000 Subject: [PATCH] Tidy QActionGroup autotest. Remove empty constructor/destructor. Remove dropDownDeleted test function which has been entirely skipped since before Qt 4.0, is obviously incomplete (it attempts to use a QComboBox that does not exist) and provides no statement of intention that might allow the incompleteness to be addressed. Change-Id: I4975b6d5a5dde1e58dab1dd393be92eddeb4c9f8 Reviewed-on: http://codereview.qt-project.org/6009 Reviewed-by: Rohan McGovern --- tests/auto/qactiongroup/tst_qactiongroup.cpp | 58 +------------------- 1 file changed, 1 insertion(+), 57 deletions(-) diff --git a/tests/auto/qactiongroup/tst_qactiongroup.cpp b/tests/auto/qactiongroup/tst_qactiongroup.cpp index d890ff4c6e..406298807a 100644 --- a/tests/auto/qactiongroup/tst_qactiongroup.cpp +++ b/tests/auto/qactiongroup/tst_qactiongroup.cpp @@ -39,48 +39,25 @@ ** ****************************************************************************/ - #include -#include #include -#include #include -#include - - #include -//TESTED_CLASS= -//TESTED_FILES= - class tst_QActionGroup : public QObject { Q_OBJECT -public: - tst_QActionGroup(); - virtual ~tst_QActionGroup(); - private slots: void enabledPropagation(); void visiblePropagation(); - void dropDownDeleted(); void exclusive(); - void separators(); void testActionInTwoQActionGroup(); - void unCheckCurrentAction(); + void unCheckCurrentAction(); }; -tst_QActionGroup::tst_QActionGroup() -{ -} - -tst_QActionGroup::~tst_QActionGroup() -{ -} - void tst_QActionGroup::enabledPropagation() { QActionGroup testActionGroup( 0 ); @@ -186,39 +163,6 @@ void tst_QActionGroup::exclusive() QVERIFY( !actThree->isChecked() ); } -void tst_QActionGroup::dropDownDeleted() -{ - QSKIP("dropDownDeleted test for Qt 4.0 not expected to work since it is not implemented yet", SkipAll); - - QMainWindow mw; - QToolBar *tb = new QToolBar(&mw); - QActionGroup *actGroup = new QActionGroup(&mw); - - /// ### actGroup->setUsesDropDown(true); - QAction *actOne = new QAction(actGroup); - actOne->setText("test one"); - QAction *actTwo = new QAction(actGroup); - actOne->setText("test one"); - QAction *actThree= new QAction(actGroup); - actOne->setText("test one"); - - QListIterator it(actGroup->actions()); - while (it.hasNext()) - tb->addAction(it.next()); - - QList comboList = qFindChildren(tb); - QCOMPARE(comboList[0]->count(), 3); - - delete actOne; - QCOMPARE((int)comboList[0]->count(), 2); - delete actTwo; - QCOMPARE((int)comboList[0]->count(), 1); - delete actThree; - QCOMPARE((int)comboList[0]->count(), 0); - - delete actGroup; -} - void tst_QActionGroup::separators() { QMainWindow mw;