aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-02-17 15:45:26 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2021-02-19 08:03:26 +0100
commit67b8f78faee20b99fbd149c0d240ca760864f86a (patch)
tree34e7cdafdffb77597cbfe4da3552d286eaaf9609 /src/qml/qml/qqmlproperty.cpp
parentf9263ecb71822f19e1795cbeacc8e6f4949ece47 (diff)
QQmlProperty: use new findAlias target overload
Change-Id: If72f0aa2b194dc3fd48ed2679c2229748e5a5001 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index 598263e0a3..786063647b 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -805,9 +805,7 @@ void QQmlPropertyPrivate::removeBinding(QObject *o, QQmlPropertyIndex index)
{
Q_ASSERT(o);
- QObject *target;
- QQmlPropertyIndex targetIndex;
- findAliasTarget(o, index, &target, &targetIndex);
+ auto [target, targetIndex] = findAliasTarget(o, index);
removeOldBinding(target, targetIndex);
}
@@ -822,7 +820,9 @@ void QQmlPropertyPrivate::removeBinding(const QQmlProperty &that)
QQmlAbstractBinding *
QQmlPropertyPrivate::binding(QObject *object, QQmlPropertyIndex index)
{
- findAliasTarget(object, index, &object, &index);
+ auto aliasTarget = findAliasTarget(object, index);
+ object = aliasTarget.targetObject;
+ index = aliasTarget.targetIndex;
QQmlData *data = QQmlData::get(object);
if (!data)