summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qabstractitemmodel.h
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-01-15 19:19:26 +0100
committerCaroline Chao <caroline.chao@theqtcompany.com>2015-02-03 18:40:19 +0000
commit7ab29c4ebb5bfc66a544a966da0b49f0e739f08c (patch)
treece8ff92cfe4ff87a416c10d07796dc1ccf8ee673 /src/corelib/itemmodels/qabstractitemmodel.h
parentae9d3f4c6c1a732788cd1f24c6a928cee16c3991 (diff)
Allow exposing QItemSelectionModel to QML
This requires being able to create a QItemSelectionModel without specifiying its model, and also setting the model later. Also, several classes, like QPersistentModelIndex, need to be declared as meta-type. Finally, and in order to introduce the 'model' property, we need to have a type compatible getter. Hence the new, non-const model() function. Where needed, meta-type declarations have been removed from auto-tests. [ChangeLog][QtCore][Item Models] QItemSelectionModel can now be created without a model and have one set later. Change-Id: If49bed061a5d1012331f335ca7f6e3959ecd3f1c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/corelib/itemmodels/qabstractitemmodel.h')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index 75c2009fe4..7699611408 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -481,4 +481,7 @@ inline uint qHash(const QModelIndex &index) Q_DECL_NOTHROW
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QModelIndexList)
+Q_DECLARE_METATYPE(QPersistentModelIndex)
+
#endif // QABSTRACTITEMMODEL_H