diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-30 15:50:47 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-12-09 08:30:57 +0000 |
commit | e54e4408bd03edc789370dd7670eb6da25e8a9bb (patch) | |
tree | c64c3ae0d48300441f5aa4d738f00a89d4973095 /src/qml/qml | |
parent | 68d73a253a974967e18ba23719af31fd47434585 (diff) |
Minor cleanup
Change-Id: I091f2de77f84fb298404dc8784defcf3a812d56a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index f450cbf965..ba3c6600b8 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -809,13 +809,14 @@ bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *property, con // the result is written to a value type virtual property, that contains the sub-index // of the "x" property. QQmlBinding *qmlBinding; + const QQmlPropertyData *prop = property; + const QQmlPropertyData *subprop = nullptr; if (_valueTypeProperty) { - qmlBinding = QQmlBinding::create(_valueTypeProperty, function, _scopeObject, context); - qmlBinding->setTarget(_bindingTarget, *_valueTypeProperty, property); - } else { - qmlBinding = QQmlBinding::create(property, function, _scopeObject, context); - qmlBinding->setTarget(_bindingTarget, *property, nullptr); + prop = _valueTypeProperty; + subprop = property; } + qmlBinding = QQmlBinding::create(prop, function, _scopeObject, context); + qmlBinding->setTarget(_bindingTarget, *prop, subprop); sharedState->allCreatedBindings.push(QQmlAbstractBinding::Ptr(qmlBinding)); |