Tidy QActionGroup autotest.
authorJason McDonald <jason.mcdonald@nokia.com>
Wed, 5 Oct 2011 04:43:11 +0000 (14:43 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 6 Oct 2011 03:28:32 +0000 (05:28 +0200)
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>
tests/auto/qactiongroup/tst_qactiongroup.cpp

index d890ff4..4062988 100644 (file)
 **
 ****************************************************************************/
 
-
 #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;