summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlbindingvme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlbindingvme.cpp')
-rw-r--r--src/declarative/qml/qmlbindingvme.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlbindingvme.cpp b/src/declarative/qml/qmlbindingvme.cpp
index 0403e2e..815e585 100644
--- a/src/declarative/qml/qmlbindingvme.cpp
+++ b/src/declarative/qml/qmlbindingvme.cpp
@@ -383,8 +383,14 @@ inline void subscribe(QObject *o, int notifyIndex,
QmlBindingVME::Config::Subscription *s = config->subscriptions + subIndex;
if (o != s->source || notifyIndex != s->notifyIndex) {
if (s->source)
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
QMetaObject::disconnectOne(s->source, s->notifyIndex,
config->target, config->targetSlot + subIndex);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(s->source, s->notifyIndex,
+ config->target, config->targetSlot + subIndex);
+#endif
s->source = o;
s->notifyIndex = notifyIndex;
if (s->source && s->notifyIndex != -1)