summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobjectdefs.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-09-06 11:41:00 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-09-16 04:11:54 +0000
commitebf0b121084822ce754c14ed7255bde0f90bf42f (patch)
treee9a4dca4498580c43f0a2ad39eb75ed093210393 /src/corelib/kernel/qobjectdefs.h
parent469d68b344380c1a9ccef95bb784b39a436a7634 (diff)
Make QDBusConnectionPrivate::relaySignal be called in the right thread
This function sends D-Bus messages directly (in huntAndEmit), so it should only be called from the QDBusConnectionManager thread. Somehow, I missed this in the Qt 5.6 refactoring of QtDBus. Being called in the wrong thread means that there's a visible behavior change compared to Qt 5.5: if the user code sent a method call or method return/error and then emitted a signal, we'd have two threads racing to send the D-Bus messages. This was observed in Telepathy-Qt code: certain signals arrived before a method return, even though they were clearly emitted by a queued QMetaObject::invokeMethod. In addition to that, we have has an internal problem (though not observed): the libdbus-1 timer and socket callbacks would be called in the wrong thread and we no longer have protection against that. Unit testing not possible since this is a race condition. Change-Id: I9e96ecd4f6aa4ff0ae08fffd1471d002142613d6 Reviewed-by: Gustavo Pichorim Boiko <gustavo.boiko@canonical.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/corelib/kernel/qobjectdefs.h')
0 files changed, 0 insertions, 0 deletions