diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-05 14:43:11 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-06 05:28:32 +0200 |
commit | 7232bc0e1c56dc95fe8affaff1155486cf84e0b7 (patch) | |
tree | 2e0e3d8fe9f10283112e3dc7b84b30d9c24c2fcf /tests | |
parent | 0a663b92ff4934b0d4f38b97edd22fe81ef521e4 (diff) |
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 <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qactiongroup/tst_qactiongroup.cpp | 58 |
1 files changed, 1 insertions, 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 <QtTest/QtTest> -#include <qcombobox.h> #include <qmainwindow.h> -#include <qmenubar.h> #include <qmenu.h> -#include <qtoolbar.h> - - #include <qaction.h> -//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<QAction*> it(actGroup->actions()); - while (it.hasNext()) - tb->addAction(it.next()); - - QList<QComboBox*> comboList = qFindChildren<QComboBox*>(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; |