aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycache.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-10-17 13:29:10 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-10-17 17:42:38 +0000
commit0da811cdfebdae1d96c99fe681e6a776e73d2f7f (patch)
tree8024250529eabc4cc1810fe270f75635451890de /src/qml/qml/qqmlpropertycache.cpp
parent9bb2e2289fdb29039fb945eb74f076585a41ce4b (diff)
QQmlPropertyData: use const APIs more
For CoW types, prefer const methods to avoid needless detach()ing. This change was here, but 86a55cdb8cb850066e1dcc288d2dddf600652994 re-introduced issue. Change-Id: Ica27cde6f7fbed881f4afa2fa7079aa30c3c1c1c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index 61d24e7341..2543fd069c 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -193,7 +193,7 @@ void QQmlPropertyData::load(const QMetaMethod &m)
if (m.parameterCount()) {
_flags.hasArguments = true;
- if ((m.parameterCount() == 1) && (m.parameterTypes().first() == "QQmlV4Function*")) {
+ if ((m.parameterCount() == 1) && (m.parameterTypes().constFirst() == "QQmlV4Function*")) {
_flags.isV4Function = true;
}
}
@@ -228,7 +228,7 @@ void QQmlPropertyData::lazyLoad(const QMetaMethod &m)
const int paramCount = m.parameterCount();
if (paramCount) {
_flags.hasArguments = true;
- if ((paramCount == 1) && (m.parameterTypes().first() == "QQmlV4Function*")) {
+ if ((paramCount == 1) && (m.parameterTypes().constFirst() == "QQmlV4Function*")) {
_flags.isV4Function = true;
}
}