aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlitemmodels/testtypes.h
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-03-06 19:27:22 +0100
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-03-22 16:20:29 +0000
commit0271609d5136fa681306c2647973a26dadc7acb3 (patch)
tree4889a233a919266fbf38551a056cf8b49d7f2bd4 /tests/auto/qml/qqmlitemmodels/testtypes.h
parentae1c3eba3e7e11a9b1ab4d18792c82c9bb6e62de (diff)
Remove QItemSelection value-type, use Array instead
We implement this by adding QItemSelection to the set of sequence types. Change-Id: Ia3db376c806d8f062639e22c7f4bf392f114c266 Reviewed-by: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'tests/auto/qml/qqmlitemmodels/testtypes.h')
-rw-r--r--tests/auto/qml/qqmlitemmodels/testtypes.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlitemmodels/testtypes.h b/tests/auto/qml/qqmlitemmodels/testtypes.h
index d61064fcad..69da24ec6e 100644
--- a/tests/auto/qml/qqmlitemmodels/testtypes.h
+++ b/tests/auto/qml/qqmlitemmodels/testtypes.h
@@ -46,6 +46,7 @@ class ItemModelsTest : public QObject
Q_PROPERTY(QModelIndex modelIndex READ modelIndex WRITE setModelIndex NOTIFY changed)
Q_PROPERTY(QPersistentModelIndex persistentModelIndex READ persistentModelIndex WRITE setPersistentModelIndex NOTIFY changed)
Q_PROPERTY(QModelIndexList modelIndexList READ modelIndexList WRITE setModelIndexList NOTIFY changed)
+ Q_PROPERTY(QItemSelection itemSelection READ itemSelection WRITE setItemSelection NOTIFY changed)
public:
ItemModelsTest(QObject *parent = 0)
@@ -84,6 +85,11 @@ public:
return list;
}
+ QItemSelection itemSelection() const
+ {
+ return m_itemSelection;
+ }
+
void emitChanged()
{
emit changed();
@@ -161,6 +167,15 @@ public slots:
emit changed();
}
+ void setItemSelection(QItemSelection arg)
+ {
+ if (m_itemSelection == arg)
+ return;
+
+ m_itemSelection = arg;
+ emit changed();
+ }
+
signals:
void changed();
@@ -174,6 +189,7 @@ private:
QPersistentModelIndex m_persistentModelIndex;
QAbstractItemModel *m_model;
QModelIndexList m_modelIndexList;
+ QItemSelection m_itemSelection;
};
#endif // TESTTYPES_H