Connect bearer engines to manager with QueuedConnection
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Fri, 27 Apr 2012 10:31:58 +0000 (11:31 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 9 May 2012 00:28:16 +0000 (02:28 +0200)
commit55070e863710d49dd4b09903be9a85ea94dff1fe
tree9c6f880db881f720499b2a2f3dfa748701c37890
parent9793dbcc4ae4f5f0976f819e6a33e82e6b24f50e
Connect bearer engines to manager with QueuedConnection

This is to avoid a deadlock that happens when a user thread is
accessing the QNetworkConfigurationManager at the same time the
plugin emits a signal.

i.e.
plugin is holding engine lock
user thread is holding manager lock and blocked trying to acquire
the engine lock
In the manager slot, it tries to acquire the manager lock.

By using queued connection, there are no locks held at the time the
manager slot is called.

Change-Id: I95f28028b5e77f77b2b9b7e31cbd1b78a8fe3097
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
src/network/bearer/qnetworkconfigmanager_p.cpp