aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-12-03 10:37:13 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-03 12:15:10 +0000
commit3aae22223acfc9704dcd53c0973edafb833b83fc (patch)
tree47f7f8ed68b198ae70084a0619ffae4173f11cdb /src/qml
parent461213ed69d8aa70e233c0676ae6028dcbae4871 (diff)
Don't return reference to temporary QModelIndex
Follow up on change in qtbase; QPMI casting to QModelIndex returns a value, not a reference. Change-Id: I227cd8ef64450986069837edee25512d9538286d Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 039c2801cfbd67e22da83f77375a06f7434b5c85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/types/qqmlmodelindexvaluetype_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/types/qqmlmodelindexvaluetype_p.h b/src/qml/types/qqmlmodelindexvaluetype_p.h
index dae04f6581..ac52a0523b 100644
--- a/src/qml/types/qqmlmodelindexvaluetype_p.h
+++ b/src/qml/types/qqmlmodelindexvaluetype_p.h
@@ -116,7 +116,7 @@ public:
inline QAbstractItemModel *model() const { return const_cast<QAbstractItemModel *>(v.model()); }
inline quint64 internalId() const { return v.internalId(); }
- static const QModelIndex &toModelIndex(const QPersistentModelIndex &index)
+ static QModelIndex toModelIndex(const QPersistentModelIndex &index)
{ return index; }
};