path: root/src/corelib/kernel/qobject.cpp
diff options
authorVolker Krause <>2014-01-16 11:31:51 +0100
committerThe Qt Project <>2014-01-16 15:53:56 +0100
commit9132dbb6592c3357585d5c589b48d814497f1cc5 (patch)
treea30f940e29d23632e180f9ab3f85f4bc3edef1c0 /src/corelib/kernel/qobject.cpp
parent87d2fa5f849b0877b75d29113ec7dd3613827904 (diff)
Do not consider a signal to be connected if only a signal spy is installed.
This fixes QtQuick key handling not propagating key events beyond the specific onXPressed handlers, due to erroneously thinking those exist, when signal spy callbacks are present. Considering signal spies for isSignalConnected() goes back to 87239ef6 in Qt4, and seems to be there just due to this code being based on activate(), where this check obviously makes sense. Change-Id: Iad41e42a8d3ee2a16a55be7d1a7cdc51484981ce Reviewed-by: Olivier Goffart <>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 5819443d3c..43b88d21b5 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -3453,8 +3453,11 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
int signal_index = signalOffset + local_signal_index;
- if (!sender->d_func()->isSignalConnected(signal_index))
+ if (!sender->d_func()->isSignalConnected(signal_index)
+ && !qt_signal_spy_callback_set.signal_begin_callback
+ && !qt_signal_spy_callback_set.signal_end_callback) {
return; // nothing connected to these signals, and no spy
+ }
if (sender->d_func()->blockSig)