diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-05-31 11:51:05 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-05-31 11:51:05 (GMT) |
commit | daba0c0d588c55e3f1591ab8ce0ef0946d1447fd (patch) | |
tree | 9f9e64ee62cc1c758c04874e9c416ceda641b67c /src | |
parent | 8293336590722f6a92a6b4af401485683b5508fa (diff) | |
download | Qt-daba0c0d588c55e3f1591ab8ce0ef0946d1447fd.zip Qt-daba0c0d588c55e3f1591ab8ce0ef0946d1447fd.tar.gz Qt-daba0c0d588c55e3f1591ab8ce0ef0946d1447fd.tar.bz2 |
Revert "Fix QNetworkConfigurationManager usage outside main thread first"
This reverts commit 5f241ec1426447380b1e938ac7888fb16cde94f8.
Reason for reverting: Some already published applications suffer
from the deadlock behaviour, causing regressions.
Conflicts:
tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager_p.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp index 2391a34..7297b0e 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.cpp +++ b/src/network/bearer/qnetworkconfigmanager_p.cpp @@ -392,6 +392,8 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations() this, SLOT(configurationRemoved(QNetworkConfigurationPrivatePointer))); connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)), this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer))); + + QMetaObject::invokeMethod(engine, "initialize"); } } @@ -421,19 +423,8 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations() startPolling(); } - if (firstUpdate) { + if (firstUpdate) firstUpdate = false; - QList<QBearerEngine*> enginesToInitialize = sessionEngines; //shallow copy the list in case it is modified when we unlock mutex - Qt::ConnectionType connectionType; - if (QCoreApplicationPrivate::mainThread() == QThread::currentThread()) - connectionType = Qt::DirectConnection; - else - connectionType = Qt::BlockingQueuedConnection; - locker.unlock(); - foreach (QBearerEngine* engine, enginesToInitialize) { - QMetaObject::invokeMethod(engine, "initialize", connectionType); - } - } } void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate() |