summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject_p.h
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2013-12-19 17:40:47 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-09 21:03:25 +0100
commit9a789a965aabc20b2084104a334a69932da60cb6 (patch)
treed5280b58e30acf5840bbd8175b03f7d9edf48852 /src/corelib/kernel/qobject_p.h
parent955d0df8736577eea0061e61a924104e34d3915d (diff)
Optimize QObject::senderSignalIndex to only iterate the d->senders once.
QObject::senderSignalIndex is, combined with ::sender(), the current hotspot in the QWebChannel which makes heavy use of it in its 1-to-many QSignalSpy implementation. This patch optimizes the senderSignalIndex by only iterating over the linked senders list once, instead of twice. I.e. it first iterated over it to find the signal index, then again to find the sender to convert to a method-offset. Change-Id: Ic86aed0dce891b87b953a6ec2364a81695bd4876 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/corelib/kernel/qobject_p.h')
-rw-r--r--src/corelib/kernel/qobject_p.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 011e140e3b..193fa78403 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -199,7 +199,6 @@ public:
return o->d_func();
}
- int senderSignalIndex() const;
int signalIndex(const char *signalName, const QMetaObject **meta = 0) const;
inline bool isSignalConnected(uint signalIdx) const;