aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickpropertychanges.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-08-09 18:32:48 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2016-08-12 16:01:10 +0000
commite5592e75b5d17f409a0623f663474f963d66486b (patch)
tree60cc03127ed7e258f01291f059f99a844bc61201 /src/quick/util/qquickpropertychanges.cpp
parent87c23b33b7293a43a851a6e43a0ddc6ef44c17e4 (diff)
Quick: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: I270cdc6eb8c5946f5c20b379bbb7c60f0ba518eb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/util/qquickpropertychanges.cpp')
-rw-r--r--src/quick/util/qquickpropertychanges.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/util/qquickpropertychanges.cpp b/src/quick/util/qquickpropertychanges.cpp
index c4be68cd31..555533a44e 100644
--- a/src/quick/util/qquickpropertychanges.cpp
+++ b/src/quick/util/qquickpropertychanges.cpp
@@ -287,7 +287,7 @@ void QQuickPropertyChangesPrivate::decodeBinding(const QString &propertyPrefix,
QQuickReplaceSignalHandler *handler = new QQuickReplaceSignalHandler;
handler->property = prop;
handler->expression.take(new QQmlBoundSignalExpression(object, QQmlPropertyPrivate::get(prop)->signalIndex(),
- QQmlContextData::get(qmlContext(q)), object, compilationUnit->runtimeFunctions[binding->value.compiledScriptIndex]));
+ QQmlContextData::get(qmlContext(q)), object, compilationUnit->runtimeFunctions.at(binding->value.compiledScriptIndex)));
signalReplacements << handler;
return;
}
@@ -455,7 +455,7 @@ QQuickPropertyChanges::ActionList QQuickPropertyChanges::actions()
QQmlBinding *newBinding = 0;
if (e.id != QQmlBinding::Invalid) {
QV4::Scope scope(QQmlEnginePrivate::getV4Engine(qmlEngine(this)));
- QV4::ScopedValue function(scope, QV4::FunctionObject::createQmlFunction(context, object(), d->compilationUnit->runtimeFunctions[e.id]));
+ QV4::ScopedValue function(scope, QV4::FunctionObject::createQmlFunction(context, object(), d->compilationUnit->runtimeFunctions.at(e.id)));
newBinding = QQmlBinding::create(&QQmlPropertyPrivate::get(prop)->core,
function, object(), context);
}