diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-07-19 19:25:25 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-07-20 19:30:29 +0000 |
commit | 51dbd978eeac258fbc34ecb06d990efb90a58866 (patch) | |
tree | a76ecbcf56b869adbc1ad8183a00d68fe8aa130b /src/qml/types/qqmldelegatemodel.cpp | |
parent | 0a2bd3df1f3be29b8d3351731eb8b79002537f82 (diff) |
qml: Pass non-trivially-copyable types by const-ref
Change-Id: Id3d960ee8236a4c6f4bb4e0add1f88dfa32d3592
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/types/qqmldelegatemodel.cpp')
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 630c7e7e4a..bc70e68904 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -1057,7 +1057,7 @@ int QQmlDelegateModel::indexOf(QObject *item, QObject *) const return -1; } -void QQmlDelegateModel::setWatchedRoles(QList<QByteArray> roles) +void QQmlDelegateModel::setWatchedRoles(const QList<QByteArray> &roles) { Q_D(QQmlDelegateModel); d->m_adaptorModel.replaceWatchedRoles(d->m_watchedRoles, roles); @@ -3185,7 +3185,7 @@ QString QQmlPartsModel::stringValue(int index, const QString &role) return QQmlDelegateModelPrivate::get(m_model)->stringValue(m_compositorGroup, index, role); } -void QQmlPartsModel::setWatchedRoles(QList<QByteArray> roles) +void QQmlPartsModel::setWatchedRoles(const QList<QByteArray> &roles) { QQmlDelegateModelPrivate *model = QQmlDelegateModelPrivate::get(m_model); model->m_adaptorModel.replaceWatchedRoles(m_watchedRoles, roles); |