diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-12-03 10:37:13 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-12-03 10:41:43 +0000 |
commit | 039c2801cfbd67e22da83f77375a06f7434b5c85 (patch) | |
tree | 62255a27566c4999dee8ad607f7aec94688f635a | |
parent | 86b9ae4da1be2f797f6d6762d870555ee8c893de (diff) |
Don't return reference to temporary QModelIndex
Follow up on change in qtbase; QPMI casting to QModelIndex returns a
value, not a reference.
Pick-to: 6.0 dev
Change-Id: I227cd8ef64450986069837edee25512d9538286d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | src/qml/types/qqmlmodelindexvaluetype_p.h | 2 |
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; } }; |