aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/qml/qqmlproperty.cpp8
-rw-r--r--src/qml/qml/qqmlproperty_p.h12
2 files changed, 20 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index 8689e90c18..598263e0a3 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -884,6 +884,14 @@ void QQmlPropertyPrivate::findAliasTarget(QObject *object, QQmlPropertyIndex bin
*targetBindingIndex = bindingIndex;
}
+QQmlPropertyPrivate::ResolvedAlias QQmlPropertyPrivate::findAliasTarget(QObject *baseObject, QQmlPropertyIndex baseIndex)
+{
+ ResolvedAlias resolved;
+ findAliasTarget(baseObject, baseIndex, &resolved.targetObject, &resolved.targetIndex);
+ return resolved;
+}
+
+
void QQmlPropertyPrivate::setBinding(QQmlAbstractBinding *binding, BindingFlags flags, QQmlPropertyData::WriteFlags writeFlags)
{
diff --git a/src/qml/qml/qqmlproperty_p.h b/src/qml/qml/qqmlproperty_p.h
index f6e9bddd93..c54d066152 100644
--- a/src/qml/qml/qqmlproperty_p.h
+++ b/src/qml/qml/qqmlproperty_p.h
@@ -114,6 +114,18 @@ public:
QQmlPropertyData::WriteFlags flags = {});
static void findAliasTarget(QObject *, QQmlPropertyIndex, QObject **, QQmlPropertyIndex *);
+ struct ResolvedAlias
+ {
+ QObject *targetObject;
+ QQmlPropertyIndex targetIndex;
+ };
+ /*!
+ \internal
+ Given an alias property specified by \a baseObject and \a baseIndex, this function
+ computes the alias target.
+ */
+ static ResolvedAlias findAliasTarget(QObject *baseObject, QQmlPropertyIndex baseIndex);
+
enum BindingFlag {
None = 0,
DontEnable = 0x1