diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2021-06-02 14:53:24 +0200 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2021-06-03 10:30:53 +0200 |
commit | 06893b68c6b1f70cb7ff255db1fa9d14697403fa (patch) | |
tree | 38326366d06fb3115f8fe42c45731d82e4dcf888 /src/qml/qml/qqmlpropertybinding_p.h | |
parent | 87b6def42a4341a4c6ac697458dd06836818b43b (diff) |
Support binding creation from QMetaType of property
QQmlBinding/QQmlPropertyBinding, created from QQmlPropertyData, really
only needed QMetaType (which is ideally always in sync with custom data
in QQmlPropertyData), so provide the versions that accept QMetaType
This way we don't need to care about QQmlPropertyData at all when we
know QMetaProperty, which is, for example, the case of object creation
compiler
Change-Id: Ia7794e5575b71ffaf111dd35b352da36598c631f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qml/qml/qqmlpropertybinding_p.h')
-rw-r--r-- | src/qml/qml/qqmlpropertybinding_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlpropertybinding_p.h b/src/qml/qml/qqmlpropertybinding_p.h index cdd4dbf59a..2765a13a21 100644 --- a/src/qml/qml/qqmlpropertybinding_p.h +++ b/src/qml/qml/qqmlpropertybinding_p.h @@ -117,6 +117,10 @@ public: QObject *obj, const QQmlRefPointer<QQmlContextData> &ctxt, QV4::ExecutionContext *scope, QObject *target, QQmlPropertyIndex targetIndex); + static QUntypedPropertyBinding create(QMetaType propertyType, QV4::Function *function, + QObject *obj, const QQmlRefPointer<QQmlContextData> &ctxt, + QV4::ExecutionContext *scope, QObject *target, + QQmlPropertyIndex targetIndex); static QUntypedPropertyBinding createFromCodeString(const QQmlPropertyData *property, const QString &str, QObject *obj, const QQmlRefPointer<QQmlContextData> &ctxt, |