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>
bb10
Jason McDonald 2011-10-05 14:43:11 +10:00 committed by Qt by Nokia
parent 0a663b92ff
commit 7232bc0e1c
1 changed files with 1 additions and 57 deletions

View File

@ -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;