summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-07-20 11:06:00 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-24 10:46:24 +0200
commitc76a641a27c46549c8272655be530b804be1936f (patch)
tree3a86a373f0a5e004b7dde00f1938ba43e70a6549 /tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
parent45cb8be4f9ab2b5b823dda104376b159c9123163 (diff)
QAbstractItemView: don't qRegisterMetaType<QModelIndex>
QModelIndex is a build-in type nowadays and doesn't need to be registered anymore. Also remove them from the tests. Change-Id: I47029972651c045c880cee86fb292116a29493d5 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp')
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
index 999335a8ef..d3e11d8f8b 100644
--- a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
@@ -47,8 +47,6 @@
#include "dynamictreemodel.h"
-Q_DECLARE_METATYPE(QModelIndex)
-
/*!
Note that this doesn't test models, but any functionality that QAbstractItemModel should provide
*/
@@ -57,7 +55,6 @@ class tst_QAbstractItemModel : public QObject
Q_OBJECT
public slots:
- void initTestCase();
void init();
void cleanup();
@@ -340,16 +337,6 @@ bool QtTestModel::canDropMimeData(const QMimeData *data, Qt::DropAction action,
return row % 2 == 0;
}
-/**
- * The source Model *must* be initialized before the _data function, since the _data function uses QModelIndexes to reference the items in the tables.
- * Therefore, we must initialize it globally.
- */
-
-void tst_QAbstractItemModel::initTestCase()
-{
- qRegisterMetaType<QModelIndex>("QModelIndex");
-}
-
void tst_QAbstractItemModel::init()
{
m_model = new DynamicTreeModel(this);