diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-12-03 16:59:30 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-12-10 05:26:05 +0000 |
commit | 1289bc8172a6829884a670a2f91ee863add5d042 (patch) | |
tree | ac72a4da3d5b84d1c2fa09582a1f545ce4bae15b /tests/auto/gui | |
parent | 872b9b231ef966ce7b2b40785ee92a0d4a8d2851 (diff) |
Tests: Remove empty init/cleanup slots, constructors and destructors.
Move some code (like registrations of meta types) from init() to
initTestCase() in the process.
Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'tests/auto/gui')
26 files changed, 26 insertions, 454 deletions
diff --git a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp index ffe3dcfb75..c940498935 100644 --- a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp +++ b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp @@ -38,17 +38,8 @@ class tst_QIcoImageFormat : public QObject { Q_OBJECT -public: - tst_QIcoImageFormat(); - virtual ~tst_QIcoImageFormat(); - - -public slots: - void initTestCase(); - void cleanupTestCase(); - void init(); - void cleanup(); private slots: + void initTestCase(); void format(); void canRead_data(); void canRead(); @@ -69,26 +60,6 @@ private: QString m_IconPath; }; - -tst_QIcoImageFormat::tst_QIcoImageFormat() -{ -} - -tst_QIcoImageFormat::~tst_QIcoImageFormat() -{ - -} - -void tst_QIcoImageFormat::init() -{ - -} - -void tst_QIcoImageFormat::cleanup() -{ - -} - void tst_QIcoImageFormat::initTestCase() { m_IconPath = QFINDTESTDATA("icons"); @@ -96,11 +67,6 @@ void tst_QIcoImageFormat::initTestCase() QFAIL("Cannot find icons directory containing testdata!"); } -void tst_QIcoImageFormat::cleanupTestCase() -{ - -} - void tst_QIcoImageFormat::format() { { diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp index c49c9c9129..c6a4d9107f 100644 --- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp @@ -61,13 +61,10 @@ class tst_QImageWriter : public QObject Q_OBJECT public: - tst_QImageWriter(); virtual ~tst_QImageWriter(); public slots: - void init(); void initTestCase(); - void cleanup(); private slots: void getSetCheck(); @@ -163,10 +160,6 @@ void tst_QImageWriter::getSetCheck() QCOMPARE(1.1f, obj1.gamma()); } -tst_QImageWriter::tst_QImageWriter() -{ -} - tst_QImageWriter::~tst_QImageWriter() { QDir dir(prefix); @@ -177,14 +170,6 @@ tst_QImageWriter::~tst_QImageWriter() } -void tst_QImageWriter::init() -{ -} - -void tst_QImageWriter::cleanup() -{ -} - void tst_QImageWriter::writeImage_data() { QTest::addColumn<QString>("fileName"); diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index b4252031e6..9a8761d076 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -64,12 +64,8 @@ class tst_QPixmap : public QObject public: tst_QPixmap(); - virtual ~tst_QPixmap(); - public slots: - void init(); - void cleanup(); void initTestCase(); void cleanupTestCase(); @@ -212,18 +208,6 @@ tst_QPixmap::tst_QPixmap() { } -tst_QPixmap::~tst_QPixmap() -{ -} - -void tst_QPixmap::init() -{ -} - -void tst_QPixmap::cleanup() -{ -} - void tst_QPixmap::initTestCase() { QVERIFY(!m_prefix.isEmpty()); diff --git a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp index 06f7793ace..418b609189 100644 --- a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp +++ b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp @@ -40,14 +40,6 @@ class tst_QStandardItem : public QObject { Q_OBJECT -public: - tst_QStandardItem(); - virtual ~tst_QStandardItem(); - -public slots: - void init(); - void cleanup(); - private slots: void ctor(); void textCtor(); @@ -84,22 +76,6 @@ private slots: void lessThan(); }; -tst_QStandardItem::tst_QStandardItem() -{ -} - -tst_QStandardItem::~tst_QStandardItem() -{ -} - -void tst_QStandardItem::init() -{ -} - -void tst_QStandardItem::cleanup() -{ -} - void tst_QStandardItem::ctor() { QStandardItem item; diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp index 7fc234670d..1e866c2324 100644 --- a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp +++ b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp @@ -44,7 +44,6 @@ class tst_QStandardItemModel : public QObject public: tst_QStandardItemModel(); - virtual ~tst_QStandardItemModel(); enum ModelChanged { RowsAboutToBeInserted, @@ -151,10 +150,8 @@ Q_DECLARE_METATYPE(Qt::Orientation) tst_QStandardItemModel::tst_QStandardItemModel() : m_model(0), rcParent(8), rcFirst(8,0), rcLast(8,0) { -} - -tst_QStandardItemModel::~tst_QStandardItemModel() -{ + qRegisterMetaType<QStandardItem*>("QStandardItem*"); + qRegisterMetaType<Qt::Orientation>("Qt::Orientation"); } /* @@ -169,9 +166,6 @@ tst_QStandardItemModel::~tst_QStandardItemModel() */ void tst_QStandardItemModel::init() { - qRegisterMetaType<QStandardItem*>("QStandardItem*"); - qRegisterMetaType<Qt::Orientation>("Qt::Orientation"); - m_model = new QStandardItemModel(defaultSize, defaultSize); connect(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int))); diff --git a/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp b/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp index d21569dcc0..0257a50924 100644 --- a/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp +++ b/tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp @@ -44,20 +44,10 @@ class tst_NoQtEventLoop : public QObject Q_OBJECT private slots: - void initTestCase(); - void cleanup(); void consumeMouseEvents(); }; -void tst_NoQtEventLoop::initTestCase() -{ -} - -void tst_NoQtEventLoop::cleanup() -{ -} - class Window : public QWindow { public: diff --git a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp index e6aa579ecd..e44f9c7da2 100644 --- a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp +++ b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp @@ -75,16 +75,10 @@ class tst_QMouseEvent : public QObject { Q_OBJECT -public: - tst_QMouseEvent(); - virtual ~tst_QMouseEvent(); - - public slots: void initTestCase(); void cleanupTestCase(); void init(); - void cleanup(); private slots: void checkMousePressEvent_data(); void checkMousePressEvent(); @@ -95,17 +89,6 @@ private: MouseEventWidget* testMouseWidget; }; - - -tst_QMouseEvent::tst_QMouseEvent() -{ -} - -tst_QMouseEvent::~tst_QMouseEvent() -{ - -} - void tst_QMouseEvent::initTestCase() { testMouseWidget = new MouseEventWidget(0); @@ -129,10 +112,6 @@ void tst_QMouseEvent::init() testMouseWidget->mouseReleaseModifiers = 0; } -void tst_QMouseEvent::cleanup() -{ -} - void tst_QMouseEvent::checkMousePressEvent_data() { QTest::addColumn<int>("buttonPressed"); diff --git a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp index 4fae6fa096..ecf7a6a248 100644 --- a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp +++ b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp @@ -51,17 +51,9 @@ class tst_qmouseevent_modal : public QObject { Q_OBJECT -public: - tst_qmouseevent_modal(); - virtual ~tst_qmouseevent_modal(); - - -public slots: +private slots: void initTestCase(); void cleanupTestCase(); - void init(); - void cleanup(); -private slots: void mousePressRelease(); private: @@ -97,14 +89,6 @@ private: int c; }; -tst_qmouseevent_modal::tst_qmouseevent_modal() -{ -} - -tst_qmouseevent_modal::~tst_qmouseevent_modal() -{ -} - void tst_qmouseevent_modal::initTestCase() { w = new TstWidget; @@ -117,14 +101,6 @@ void tst_qmouseevent_modal::cleanupTestCase() w = 0; } -void tst_qmouseevent_modal::init() -{ -} - -void tst_qmouseevent_modal::cleanup() -{ -} - /* Test for task 22500 */ diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 1571053d7e..266b1c2896 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -81,14 +81,9 @@ Q_OBJECT public: tst_QPainter(); - virtual ~tst_QPainter(); - -public slots: - void init(); - void cleanup(); - void cleanupTestCase(); private slots: + void cleanupTestCase(); void getSetCheck(); #ifndef QT_NO_WIDGETS void drawPixmap_comp_data(); @@ -392,18 +387,6 @@ tst_QPainter::tst_QPainter() QGuiApplication::setDesktopSettingsAware(true); } -tst_QPainter::~tst_QPainter() -{ -} - -void tst_QPainter::init() -{ -} - -void tst_QPainter::cleanup() -{ -} - void tst_QPainter::cleanupTestCase() { QFile::remove(QLatin1String("dest.png")); diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp index 60b89aa6ab..fa6a11022d 100644 --- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp +++ b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp @@ -43,14 +43,6 @@ class tst_QTransform : public QObject { Q_OBJECT -public: - tst_QTransform(); - virtual ~tst_QTransform(); - - -public slots: - void init(); - void cleanup(); private slots: void mapRect_data(); void mapToPolygon_data(); @@ -80,24 +72,6 @@ private: Q_DECLARE_METATYPE(QTransform) -tst_QTransform::tst_QTransform() -{ -} - -tst_QTransform::~tst_QTransform() -{ -} - -void tst_QTransform::init() -{ - // No initialisation is required -} - -void tst_QTransform::cleanup() -{ - // No cleanup is required. -} - #if defined(Q_OS_WIN) && !defined(M_PI) #define M_PI 3.14159265897932384626433832795f #endif diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp index c4c4789b7a..9d87bddbe7 100644 --- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp +++ b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp @@ -42,14 +42,6 @@ class tst_QWMatrix : public QObject { Q_OBJECT -public: - tst_QWMatrix(); - virtual ~tst_QWMatrix(); - - -public slots: - void init(); - void cleanup(); private slots: void mapRect_data(); void mapToPolygon_data(); @@ -65,25 +57,6 @@ private: void mapping_data(); }; - -tst_QWMatrix::tst_QWMatrix() -{ -} - -tst_QWMatrix::~tst_QWMatrix() -{ -} - -void tst_QWMatrix::init() -{ - // No initialisation is required -} - -void tst_QWMatrix::cleanup() -{ - // No cleanup is required. -} - void tst_QWMatrix::mapRect_data() { mapping_data(); diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index 844a091495..320ca68f1a 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -50,13 +50,6 @@ class tst_QFont : public QObject { Q_OBJECT -public: - tst_QFont(); - virtual ~tst_QFont(); - -public slots: - void init(); - void cleanup(); private slots: void getSetCheck(); void exactMatch(); @@ -115,27 +108,6 @@ void tst_QFont::getSetCheck() QCOMPARE(QFont::StyleStrategy(QFont::OpenGLCompatible), obj1.styleStrategy()); } -tst_QFont::tst_QFont() -{ -} - -tst_QFont::~tst_QFont() -{ - -} - -void tst_QFont::init() -{ -// TODO: Add initialization code here. -// This will be executed immediately before each test is run. -} - -void tst_QFont::cleanup() -{ -// TODO: Add cleanup code here. -// This will be executed immediately after each test is run. -} - void tst_QFont::exactMatch() { QFont font; diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index 5cc27f32b3..d142617666 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -46,13 +46,9 @@ Q_OBJECT public: tst_QFontDatabase(); - virtual ~tst_QFontDatabase(); -public slots: - void initTestCase(); - void init(); - void cleanup(); private slots: + void initTestCase(); void styles_data(); void styles(); @@ -82,28 +78,11 @@ tst_QFontDatabase::tst_QFontDatabase() { } -tst_QFontDatabase::~tst_QFontDatabase() -{ - -} - void tst_QFontDatabase::initTestCase() { QVERIFY(!m_testFont.isEmpty()); } -void tst_QFontDatabase::init() -{ -// TODO: Add initialization code here. -// This will be executed immediately before each test is run. -} - -void tst_QFontDatabase::cleanup() -{ -// TODO: Add cleanup code here. -// This will be executed immediately after each test is run. -} - void tst_QFontDatabase::styles_data() { QTest::addColumn<QString>("font"); diff --git a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp index ec62bafd6c..f0a2b24873 100644 --- a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp +++ b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp @@ -44,13 +44,6 @@ class tst_QFontMetrics : public QObject { Q_OBJECT -public: - tst_QFontMetrics(); - virtual ~tst_QFontMetrics(); - -public slots: - void init(); - void cleanup(); private slots: void same(); void metrics(); @@ -68,24 +61,6 @@ private slots: void leadingBelowLine(); }; -tst_QFontMetrics::tst_QFontMetrics() - -{ -} - -tst_QFontMetrics::~tst_QFontMetrics() -{ - -} - -void tst_QFontMetrics::init() -{ -} - -void tst_QFontMetrics::cleanup() -{ -} - void tst_QFontMetrics::same() { QFont font; diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp index b8134291af..4992d6927b 100644 --- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp +++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp @@ -43,18 +43,22 @@ // #define DEBUG_SAVE_IMAGE +static inline QImage blankSquare() +{ + // a "blank" square; we compare against in our testfunctions to verify + // that we have actually painted something + QPixmap pm(1000, 1000); + pm.fill(Qt::white); + return pm.toImage(); +} + class tst_QStaticText: public QObject { Q_OBJECT public: - tst_QStaticText() {} + tst_QStaticText() : m_whiteSquare(blankSquare()) {} private slots: - void initTestCase(); - - void init(); - void cleanup(); - void constructionAndDestruction(); void drawToPoint_data(); void drawToPoint(); @@ -96,28 +100,11 @@ private slots: private: bool supportsTransformations() const; - QImage const m_whiteSquare; + const QImage m_whiteSquare; }; Q_DECLARE_METATYPE(QImage::Format); -void tst_QStaticText::initTestCase() -{ - // a "blank" square; we compare against in our testfunctions to verify - // that we have actually painted something - QPixmap pm(1000, 1000); - pm.fill(Qt::white); - const_cast<QImage&>(m_whiteSquare) = pm.toImage(); -} - -void tst_QStaticText::init() -{ -} - -void tst_QStaticText::cleanup() -{ -} - void tst_QStaticText::constructionAndDestruction() { QStaticText text("My text"); diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp index 06448d11fe..a085d628d3 100644 --- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp +++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp @@ -69,14 +69,10 @@ public: class tst_QSyntaxHighlighter : public QObject { Q_OBJECT -public: - inline tst_QSyntaxHighlighter() {} -public slots: +private slots: void init(); void cleanup(); - -private slots: void basic(); void basicTwo(); void removeFormatsOnDelete(); diff --git a/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp b/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp index 49300871d9..3301b0b003 100644 --- a/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp +++ b/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp @@ -48,14 +48,9 @@ class tst_QTextBlock : public QObject { Q_OBJECT -public: - tst_QTextBlock(); - - -public slots: +private slots: void init(); void cleanup(); -private slots: void fragmentOverBlockBoundaries(); void excludeParagraphSeparatorFragment(); void backwardsBlockIterator(); @@ -67,9 +62,6 @@ private: QTextCursor cursor; }; -tst_QTextBlock::tst_QTextBlock() -{} - void tst_QTextBlock::init() { doc = new QTextDocument; diff --git a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp index 1ecc3f2eae..1e42fc4686 100644 --- a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp +++ b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp @@ -51,14 +51,9 @@ class tst_QTextCursor : public QObject { Q_OBJECT -public: - tst_QTextCursor(); - - -public slots: +private slots: void init(); void cleanup(); -private slots: void navigation1(); void navigation2_data(); void navigation2(); @@ -154,10 +149,6 @@ private: QTextCursor cursor; }; - -tst_QTextCursor::tst_QTextCursor() -{} - void tst_QTextCursor::init() { doc = new QTextDocument; diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp index ef96cda97d..3658a37ca7 100644 --- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp @@ -64,13 +64,11 @@ class tst_QTextDocument : public QObject public: tst_QTextDocument(); - virtual ~tst_QTextDocument(); -public slots: +private slots: void init(); void cleanup(); void cleanupTestCase(); -private slots: void getSetCheck(); void isEmpty(); void find_data(); @@ -247,10 +245,6 @@ tst_QTextDocument::tst_QTextDocument() img.save("foo.png"); } -tst_QTextDocument::~tst_QTextDocument() -{ -} - void tst_QTextDocument::init() { doc = new QTextDocument; diff --git a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp index f59f542a2b..1ae3462801 100644 --- a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp +++ b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp @@ -47,16 +47,11 @@ class tst_QTextDocumentLayout : public QObject { Q_OBJECT -public: - inline tst_QTextDocumentLayout() {} - virtual ~tst_QTextDocumentLayout() {} -public slots: +private slots: void init(); void cleanup(); void cleanupTestCase(); - -private slots: void defaultPageSizeHandling(); void idealWidth(); void lineSeparatorFollowingTable(); diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp index 60ad5d32f5..4b99875f8f 100644 --- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp @@ -59,13 +59,10 @@ class tst_QTextLayout : public QObject public: tst_QTextLayout(); - virtual ~tst_QTextLayout(); - -public slots: +private slots: void init(); void cleanup(); -private slots: void getSetCheck(); void lineBreaking(); #ifdef QT_BUILD_INTERNAL @@ -199,10 +196,6 @@ tst_QTextLayout::tst_QTextLayout() #endif } -tst_QTextLayout::~tst_QTextLayout() -{ -} - void tst_QTextLayout::init() { testFont = QFont(); diff --git a/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp b/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp index 03e557d8dd..f73b4e1d93 100644 --- a/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp +++ b/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp @@ -45,14 +45,9 @@ class tst_QTextList : public QObject { Q_OBJECT -public: - tst_QTextList(); - - -public slots: +private slots: void init(); void cleanup(); -private slots: void item(); void autoNumbering(); void autoNumberingRTL(); @@ -78,9 +73,6 @@ private: QTestDocumentLayout *layout; }; -tst_QTextList::tst_QTextList() -{} - void tst_QTextList::init() { doc = new QTextDocument(); diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp index 37b815c2e3..7c0962fcb6 100644 --- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp +++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp @@ -44,14 +44,9 @@ class tst_QTextScriptEngine : public QObject public: tst_QTextScriptEngine(); - virtual ~tst_QTextScriptEngine(); - -public slots: - void initTestCase(); - void init(); - void cleanup(); private slots: + void initTestCase(); void devanagari_data(); void devanagari(); void bengali_data(); @@ -97,10 +92,6 @@ tst_QTextScriptEngine::tst_QTextScriptEngine() { } -tst_QTextScriptEngine::~tst_QTextScriptEngine() -{ -} - void tst_QTextScriptEngine::initTestCase() { if (!haveTestFonts) { @@ -114,14 +105,6 @@ void tst_QTextScriptEngine::initTestCase() } } -void tst_QTextScriptEngine::init() -{ -} - -void tst_QTextScriptEngine::cleanup() -{ -} - struct ShapeTable { unsigned short unicode[16]; unsigned short glyphs[16]; diff --git a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp index 1c099acc56..0ac0bf719c 100644 --- a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp +++ b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp @@ -58,14 +58,9 @@ class tst_QTextTable : public QObject { Q_OBJECT -public: - tst_QTextTable(); - - -public slots: +private slots: void init(); void cleanup(); -private slots: void cursorPositioning(); void variousTableModifications(); void tableShrinking(); @@ -115,9 +110,6 @@ private: QTextCursor cursor; }; -tst_QTextTable::tst_QTextTable() -{} - void tst_QTextTable::init() { doc = new QTextDocument; diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp index db4b15530c..643afe5509 100644 --- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp +++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp @@ -41,34 +41,12 @@ class tst_qdesktopservices : public QObject { Q_OBJECT -public: - tst_qdesktopservices(); - virtual ~tst_qdesktopservices(); - private slots: - void init(); - void cleanup(); void openUrl(); void handlers(); void testDataLocation(); }; -tst_qdesktopservices::tst_qdesktopservices() -{ -} - -tst_qdesktopservices::~tst_qdesktopservices() -{ -} - -void tst_qdesktopservices::init() -{ -} - -void tst_qdesktopservices::cleanup() -{ -} - void tst_qdesktopservices::openUrl() { // At the bare minimum check that they return false for invalid url's diff --git a/tests/auto/gui/util/qregexpvalidator/tst_qregexpvalidator.cpp b/tests/auto/gui/util/qregexpvalidator/tst_qregexpvalidator.cpp index 00876d934d..fb3a1cb5a9 100644 --- a/tests/auto/gui/util/qregexpvalidator/tst_qregexpvalidator.cpp +++ b/tests/auto/gui/util/qregexpvalidator/tst_qregexpvalidator.cpp @@ -42,38 +42,11 @@ class tst_QRegExpValidator : public QObject { Q_OBJECT -public: - tst_QRegExpValidator(); - virtual ~tst_QRegExpValidator(); - - - // I can think of no other way to do this for the moment - enum State { Invalid=0, Intermediate=1, Acceptable=2 }; -public slots: - void init(); - void cleanup(); private slots: void validate_data(); void validate(); }; -tst_QRegExpValidator::tst_QRegExpValidator() -{ -} - -tst_QRegExpValidator::~tst_QRegExpValidator() -{ - -} - -void tst_QRegExpValidator::init() -{ -} - -void tst_QRegExpValidator::cleanup() -{ -} - void tst_QRegExpValidator::validate_data() { |