aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmldelegatemodel_p_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-06-22 21:17:07 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-07-09 10:49:00 +0000
commitc78aa5857197e8ded675a35165b59d406a379e24 (patch)
tree46b7673ef563f110c9e8420d5bb00d07022348d7 /src/qml/types/qqmldelegatemodel_p_p.h
parenta7f17c437e1c5b33ee6ac39e05f33ab3648a2fdc (diff)
QQmlDelegateModelItem: set row and column explicit
Whenever we set a model index on a model item, set row and column explicit as well. We used to calculate row and column by calling out to QQmlDelegateModel from within QQmlDelegateModelItem. But we want to remove the dependency to QQmlDelegateModel as much as possible, to be able to reuse QQmlDelegateModelItem also from other model classes (first and foremost the upcoming QQmlTableInstanceModel). Change-Id: Ib80b31250010b2611ba1715d3324145117add865 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qml/types/qqmldelegatemodel_p_p.h')
-rw-r--r--src/qml/types/qqmldelegatemodel_p_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qml/types/qqmldelegatemodel_p_p.h
index a0c1f6aa12..0c24e79c1b 100644
--- a/src/qml/types/qqmldelegatemodel_p_p.h
+++ b/src/qml/types/qqmldelegatemodel_p_p.h
@@ -99,7 +99,7 @@ class QQmlDelegateModelItem : public QObject
Q_PROPERTY(int column MEMBER column NOTIFY columnChanged)
Q_PROPERTY(QObject *model READ modelObject CONSTANT)
public:
- QQmlDelegateModelItem(QQmlDelegateModelItemMetaType *metaType, int modelIndex);
+ QQmlDelegateModelItem(QQmlDelegateModelItemMetaType *metaType, int modelIndex, int row, int column);
~QQmlDelegateModelItem();
void referenceObject() { ++objectRef; }
@@ -123,7 +123,7 @@ public:
int groupIndex(Compositor::Group group);
int modelIndex() const { return index; }
- virtual void setModelIndex(int idx);
+ virtual void setModelIndex(int idx, int newRow, int newColumn);
virtual QV4::ReturnedValue get() { return QV4::QObjectWrapper::wrap(v4, this); }