diff options
Diffstat (limited to 'src/declarative/qml/qdeclarativenotifier.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativenotifier.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativenotifier.cpp b/src/declarative/qml/qdeclarativenotifier.cpp index 8c946f8..2e3f756 100644 --- a/src/declarative/qml/qdeclarativenotifier.cpp +++ b/src/declarative/qml/qdeclarativenotifier.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "private/qdeclarativenotifier_p.h" +#include "private/qdeclarativeproperty_p.h" QT_BEGIN_NAMESPACE @@ -66,6 +67,21 @@ void QDeclarativeNotifier::emitNotify(QDeclarativeNotifierEndpoint *endpoint) if (oldDisconnected) *oldDisconnected = endpoint; } +void QDeclarativeNotifierEndpoint::connect(QObject *source, int sourceSignal) +{ + Signal *s = toSignal(); + + if (s->source == source && s->sourceSignal == sourceSignal) + return; + + disconnect(); + + QDeclarativePropertyPrivate::connect(source, sourceSignal, target, targetMethod); + + s->source = source; + s->sourceSignal = sourceSignal; +} + void QDeclarativeNotifierEndpoint::copyAndClear(QDeclarativeNotifierEndpoint &other) { other.disconnect(); |