diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2013-01-07 11:39:45 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-09 18:19:12 +0100 |
commit | ccbff3fce504bd2ee99fe22f6e275c7033a3f9f7 (patch) | |
tree | aa20bfed310f271304bd3cd773b650bbc24a6b07 | |
parent | 63f24f6ba8417e90294a1a90d01a3c3de80b7af4 (diff) |
Clean up some metatype declarations and registrations
Change-Id: I0826f6502cc45279f29f248f5f28f4fc9e6c8b4e
Reviewed-by: David Faure <david.faure@kdab.com>
8 files changed, 3 insertions, 22 deletions
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp index 970d6a995b..1876184e7e 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp @@ -44,7 +44,6 @@ #include <QtCore/qsequentialanimationgroup.h> Q_DECLARE_METATYPE(QAbstractAnimation::State) -Q_DECLARE_METATYPE(QAbstractAnimation*) class tst_QSequentialAnimationGroup : public QObject { @@ -84,7 +83,6 @@ private slots: void tst_QSequentialAnimationGroup::initTestCase() { qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State"); - qRegisterMetaType<QAbstractAnimation*>("QAbstractAnimation*"); } void tst_QSequentialAnimationGroup::construction() diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp index 98c12b01c1..070e78437f 100644 --- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp +++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp @@ -1256,7 +1256,6 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot() process->start("testProcessEcho/testProcessEcho"); QVERIFY(process->waitForStarted(5000)); - qRegisterMetaType<qint64>("qint64"); QSignalSpy spy(process, SIGNAL(bytesWritten(qint64))); QVERIFY(spy.isValid()); process->write("f"); diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp index b987fb6835..368c5240e7 100644 --- a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp @@ -467,9 +467,6 @@ typedef QPair<int, int> Position; typedef QVector<QPair<int, int> > Selection; typedef QVector<QVector<QString> > StringTable; typedef QVector<QString> StringTableRow; -Q_DECLARE_METATYPE(Position) -Q_DECLARE_METATYPE(Selection) -Q_DECLARE_METATYPE(StringTable) static StringTableRow qStringTableRow(const QString &s1, const QString &s2, const QString &s3) { @@ -1922,8 +1919,6 @@ public: void tst_QAbstractItemModel::testDataChanged() { - qRegisterMetaType<QVector<int> >(); - CustomRoleModel model; QSignalSpy withRoles(&model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>))); diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp index 30beffe467..8138ad939b 100644 --- a/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp @@ -281,8 +281,6 @@ void tst_QAbstractProxyModel::revert() // public void setSourceModel(QAbstractItemModel* sourceModel) void tst_QAbstractProxyModel::setSourceModel() { - qRegisterMetaType<QAbstractItemModel*>(); - SubQAbstractProxyModel model; QCOMPARE(model.property("sourceModel"), QVariant::fromValue<QAbstractItemModel*>(0)); diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp index 576ef7747c..0894847572 100644 --- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp @@ -54,6 +54,8 @@ typedef QList<int> IntList; typedef QPair<int, int> IntPair; typedef QList<IntPair> IntPairList; +Q_DECLARE_METATYPE(QList<QPersistentModelIndex>) + class tst_QSortFilterProxyModel : public QObject { Q_OBJECT @@ -174,9 +176,7 @@ tst_QSortFilterProxyModel::tst_QSortFilterProxyModel() void tst_QSortFilterProxyModel::initTestCase() { - qRegisterMetaType<IntList>("IntList"); - qRegisterMetaType<IntPair>("IntPair"); - qRegisterMetaType<IntPairList>("IntPairList"); + qRegisterMetaType<QList<QPersistentModelIndex> >(); m_model = new QStandardItemModel(0, 1); m_proxy = new QSortFilterProxyModel(); m_proxy->setSourceModel(m_model); @@ -3242,8 +3242,6 @@ void tst_QSortFilterProxyModel::resetInvalidate() QCOMPARE(ok, works); } -Q_DECLARE_METATYPE(QList<QPersistentModelIndex>) - void tst_QSortFilterProxyModel::testParentLayoutChanged() { QStandardItemModel model; @@ -3276,8 +3274,6 @@ void tst_QSortFilterProxyModel::testParentLayoutChanged() proxy2.setSourceModel(&proxy); proxy2.setObjectName("proxy2"); - qRegisterMetaType<QList<QPersistentModelIndex> >(); - QSignalSpy dataChangedSpy(&model, SIGNAL(dataChanged(QModelIndex,QModelIndex))); QVERIFY(dataChangedSpy.isValid()); @@ -3411,8 +3407,6 @@ private: void tst_QSortFilterProxyModel::moveSourceRows() { - qRegisterMetaType<QList<QPersistentModelIndex> >(); - DynamicTreeModel model; { diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index 37543a33a0..0d48789a7a 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -2204,7 +2204,6 @@ void tst_QGraphicsItem::sceneMatrix() void tst_QGraphicsItem::setMatrix() { QGraphicsScene scene; - qRegisterMetaType<QList<QRectF> >("QList<QRectF>"); QSignalSpy spy(&scene, SIGNAL(changed(QList<QRectF>))); QRectF unrotatedRect(-12, -34, 56, 78); QGraphicsRectItem item(unrotatedRect, 0); diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index 269440e37e..79cded8f9b 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -316,7 +316,6 @@ void tst_QDateTimeEdit::getSetCheck() tst_QDateTimeEdit::tst_QDateTimeEdit() { - qRegisterMetaType<QList<int> >("QList<int>"); } tst_QDateTimeEdit::~tst_QDateTimeEdit() diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp index 3aefe26b1c..974502ff9d 100644 --- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp +++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp @@ -1122,7 +1122,6 @@ void tst_QMenuBar::check_menuPosition() void tst_QMenuBar::task223138_triggered() { - qRegisterMetaType<QAction *>("QAction *"); //we create a window with submenus and we check that both menubar and menus get the triggered signal QMainWindow win; QMenu *menu = win.menuBar()->addMenu("test"); |