aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmlmodelindexvaluetype_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlmodels/qqmlmodelindexvaluetype_p.h')
-rw-r--r--src/qmlmodels/qqmlmodelindexvaluetype_p.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qmlmodels/qqmlmodelindexvaluetype_p.h b/src/qmlmodels/qqmlmodelindexvaluetype_p.h
index 9d5099a8f1..35ebacc051 100644
--- a/src/qmlmodels/qqmlmodelindexvaluetype_p.h
+++ b/src/qmlmodels/qqmlmodelindexvaluetype_p.h
@@ -42,6 +42,9 @@ public:
Q_INVOKABLE QString toString() const
{ return QLatin1String("QModelIndex") + propertiesString(v); }
+ Q_REVISION(6, 7) Q_INVOKABLE QVariant data(int role = Qt::DisplayRole) const
+ { return v.data(role); }
+
inline int row() const noexcept { return v.row(); }
inline int column() const noexcept { return v.column(); }
inline QModelIndex parent() const { return v.parent(); }
@@ -54,6 +57,8 @@ public:
static QPersistentModelIndex toPersistentModelIndex(const QModelIndex &index)
{ return QPersistentModelIndex(index); }
+
+ operator QModelIndex() const { return v; }
};
struct QQmlPersistentModelIndexValueType
@@ -76,12 +81,17 @@ public:
Q_INVOKABLE QString toString() const
{ return QLatin1String("QPersistentModelIndex") + QQmlModelIndexValueType::propertiesString(v); }
+ Q_REVISION(6, 7) Q_INVOKABLE QVariant data(int role = Qt::DisplayRole) const
+ { return v.data(role); }
+
inline int row() const { return v.row(); }
inline int column() const { return v.column(); }
inline QModelIndex parent() const { return v.parent(); }
inline bool isValid() const { return v.isValid(); }
inline QAbstractItemModel *model() const { return const_cast<QAbstractItemModel *>(v.model()); }
inline quint64 internalId() const { return v.internalId(); }
+
+ operator QPersistentModelIndex() const { return v; }
};
struct QQmlItemSelectionRangeValueType
@@ -129,6 +139,8 @@ public:
inline QAbstractItemModel *model() const { return const_cast<QAbstractItemModel *>(v.model()); }
inline bool isValid() const { return v.isValid(); }
inline bool isEmpty() const { return v.isEmpty(); }
+
+ operator QItemSelectionRange() const { return v; }
};
struct QModelIndexListForeign