qt5base-lts/tests/auto/dbus
Thiago Macieira 1f6fa1f37a Suspend processing of some messages in the default busses by default
To retain a bit compatibility with applications developed in the last 9
years that expect that QDBusConnections won't process their events until
the event loop runs, we now suspend the handling of incoming messages
in the two default buses (and only in them) and resume when the event
loop starts. This is required because the new threaded QtDBus would
otherwise process incoming messages that the application didn't expect
it to.

For example, if the application first acquires names on the bus and only
after that registers objects with QtDBus, there's a small window in
which the name is acquired and visible to other applications, but no
objects are registered yet. Calls to those objects may be received,
would then be processed in the QDBusConnectionManager thread and fail.

The work around is to disable the actual handling of method calls and
signals in QDBusConnectionPrivate::handleMessage. Instead, those
messages are queued until later.

Due to the way that libdbus-1 works, outgoing method calls that are
waiting for replies are not affected, since their processing does not
happen in handleMessage().

[ChangeLog][Important Behavior Changes] QtDBus now uses threads to
implement processing of incoming and outgoing messages. This solves a
number of thread safety issues and fixes an architectural problem that
would cause all processing to stop if a particular thread (usually the
main thread) were blocked in any operation. On the flip side, application
developers need to know that modifications to a QDBusConnection may be
visible immediately on the connection, so they should be done in an
order that won't allow for incomplete states to be observed (for
example, first register all objects, then acquire service names).

Change-Id: I39cc61d0d59846ab8c23ffff1423c6d555f6ee0a
Reviewed-by: David Faure <david.faure@kdab.com>
2016-01-02 02:05:45 +00:00
..
qdbusabstractadaptor tst_QDBusAbstractAdaptor: fix reception of signals from P2P connection 2015-09-15 02:09:00 +00:00
qdbusabstractinterface tst_QDBusAbstractInterface: fix racy test failing every so often 2015-09-24 07:37:05 +00:00
qdbusconnection And move the creation of connections to the thread 2015-09-15 02:08:45 +00:00
qdbusconnection_delayed Suspend processing of some messages in the default busses by default 2016-01-02 02:05:45 +00:00
qdbusconnection_no_app And move the creation of connections to the thread 2015-09-15 02:08:45 +00:00
qdbusconnection_no_bus Update copyright headers 2015-02-11 06:49:51 +00:00
qdbuscontext Tests: remove insignificant flag for dbus tests on osx 2015-03-27 18:37:30 +00:00
qdbusinterface Autotest: rename sub tests from "test" to something meaningful 2015-07-18 02:22:40 +00:00
qdbuslocalcalls Tests: remove insignificant flag for dbus tests on osx 2015-03-27 18:37:30 +00:00
qdbusmarshall Tests: Always verify whether QTemporaryDir/File creation succeeded. 2015-09-28 15:05:43 +00:00
qdbusmetaobject Tests: remove insignificant flag for dbus tests on osx 2015-03-27 18:37:30 +00:00
qdbusmetatype Tests: remove insignificant flag for dbus tests on osx 2015-03-27 18:37:30 +00:00
qdbuspendingcall Use a dedicated thread for handling incoming libdbus-1 events 2015-09-15 02:08:36 +00:00
qdbuspendingreply Tests: remove insignificant flag for dbus tests on osx 2015-03-27 18:37:30 +00:00
qdbusreply Tests: remove insignificant flag for dbus tests on osx 2015-03-27 18:37:30 +00:00
qdbusservicewatcher QDBusServiceWatcher: Move the logic to QDBusConnectionPrivate 2015-09-15 02:08:50 +00:00
qdbusthreading Tests: remove insignificant flag for dbus tests on osx 2015-03-27 18:37:30 +00:00
qdbustype Don't try to dynamically resolve dbus symbols if QT_NO_LIBRARY 2015-08-13 15:02:55 +00:00
qdbusxmlparser Add getter and setter for qt_qhash_seed 2015-09-22 14:17:46 +00:00
dbus.pro Suspend processing of some messages in the default busses by default 2016-01-02 02:05:45 +00:00