summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2012-04-24 15:01:47 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-02 10:59:41 +0200
commitbcd477e0bc48bb028193d7707d1ecfbd61b5bdc1 (patch)
tree5b34c02f76c4e9c8b3aeb7eec6fc69ac3b864e24 /src/corelib/kernel/qobject.h
parentade888860334d207f5f070b0bc9c4c98deaf3862 (diff)
Introduce QObject::isSignalConnected(QMetaMethod)
This is much more performant than calling QObject::receivers(const char*) Can be used instead of connectNotify in some cases. Change-Id: I19e0933f678f171f515d9a0f69f0ad4fb7d894b4 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r--src/corelib/kernel/qobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index d840d9184f..5e969d67f6 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -365,6 +365,7 @@ protected:
QObject *sender() const;
int senderSignalIndex() const;
int receivers(const char* signal) const;
+ bool isSignalConnected(const QMetaMethod &signal) const;
virtual void timerEvent(QTimerEvent *);
virtual void childEvent(QChildEvent *);