summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-12-03 16:59:30 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-12-10 05:26:05 +0000
commit1289bc8172a6829884a670a2f91ee863add5d042 (patch)
treeac72a4da3d5b84d1c2fa09582a1f545ce4bae15b /tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
parent872b9b231ef966ce7b2b40785ee92a0d4a8d2851 (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/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp')
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp10
1 files changed, 2 insertions, 8 deletions
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)));