diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-03-20 15:35:10 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-03-21 13:39:01 +0000 |
commit | c45f2eab8553a40d7185ed95b4ab3e45e95c8d70 (patch) | |
tree | 6e75481a43f6fa09530f32c2633d54870da942f8 /tests/auto/corelib/itemmodels/qitemmodel | |
parent | e8a990c67467d60d4b95a94c1b763284e331adcf (diff) |
Silence the item model tests
Introduce a logging category for the qDebug()-output.
Add a meta type registration for QList<QPersistentModelIndex>, fixing
numerous warnings like:
WARN : tst_QItemModel::remove(QStandardItemModel:invalid start, valid count 5) QSignalSpy: Unable to handle parameter 'parents' of type 'QList<QPersistentModelIndex>' of method 'layoutChanged', use qRegisterMetaType to register it.
Fix a Clang warning about potential misuse of operator ,
Task-number: QTBUG-73864
Change-Id: I60998403a44f5df8767926951ee13d1ed1e93c37
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto/corelib/itemmodels/qitemmodel')
-rw-r--r-- | tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp index 7cd220e684..af52852b99 100644 --- a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp @@ -125,6 +125,7 @@ private: tst_QItemModel::tst_QItemModel() { qRegisterMetaType<QAbstractItemModel::LayoutChangeHint>(); + qRegisterMetaType<QList<QPersistentModelIndex>>(); } void tst_QItemModel::init() @@ -181,7 +182,7 @@ void tst_QItemModel::nonDestructiveBasicTest() currentModel->hasChildren(QModelIndex()); currentModel->hasIndex(0, 0); currentModel->headerData(0, Qt::Horizontal); - currentModel->index(0,0), QModelIndex(); + currentModel->index(0,0); currentModel->itemData(QModelIndex()); QVariant cache; currentModel->match(QModelIndex(), -1, cache); |