aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/qml/qqmlproperty.cpp15
-rw-r--r--src/qml/qml/qqmlproperty.h1
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;