aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index 21bbcadb1c..9a138dcf80 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -798,7 +798,7 @@ QQmlPropertyPrivate::binding(QObject *object, QQmlPropertyIndex index)
const int coreIndex = index.coreIndex();
const int valueTypeIndex = index.valueTypeIndex();
- if (!data->hasBindingBit(coreIndex))
+ if (coreIndex < 0 || !data->hasBindingBit(coreIndex))
return 0;
QQmlAbstractBinding *binding = data->bindings;
@@ -1546,6 +1546,9 @@ bool QQmlProperty::connectNotifySignal(QObject *dest, int method) const
represent a regular Qt property or if it has no
change notifier signal, or if the \a dest object does
not have the specified \a slot.
+
+ \note \a slot should be passed using the SLOT() macro so it is
+ correctly identified.
*/
bool QQmlProperty::connectNotifySignal(QObject *dest, const char *slot) const
{