diff options
author | Fabian Kosmale <[email protected]> | 2021-02-23 10:26:54 +0100 |
---|---|---|
committer | Fabian Kosmale <[email protected]> | 2021-03-04 12:53:45 +0100 |
commit | 776d1f0bf02c5dc2a9dac4c5bd906f4421abf2f4 (patch) | |
tree | ea22399085534d793f2abf5af88597d537170bc3 /src | |
parent | a4bf9033792e9743e1693345af6d844b8856719d (diff) |
QQmlProperty: add method to query bindability
Internal for now.
Task-number: QTBUG-91000
Change-Id: I744277426d5038de9266ca0adf7d281230fb4a7c
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Andrei Golubev <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlproperty.cpp | 15 | ||||
-rw-r--r-- | src/qml/qml/qqmlproperty.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index 522a97382b..f2915c950d 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -640,6 +640,21 @@ bool QQmlProperty::isWritable() const } /*! + \internal + Returns true if the property is bindable, otherwise false. + */ +bool QQmlProperty::isBindable() const +{ + if (!d) + return false; + if (!d->object) + return false; + if (d->core.isValid()) + return d->core.isBindable(); + return false; +} + +/*! Returns true if the property is designable, otherwise false. */ bool QQmlProperty::isDesignable() const diff --git a/src/qml/qml/qqmlproperty.h b/src/qml/qml/qqmlproperty.h index 612d442aec..aa455101dc 100644 --- a/src/qml/qml/qqmlproperty.h +++ b/src/qml/qml/qqmlproperty.h @@ -114,6 +114,7 @@ public: bool connectNotifySignal(QObject *dest, int method) const; bool isWritable() const; + bool isBindable() const; bool isDesignable() const; bool isResettable() const; QObject *object() const; |