diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-05-13 15:19:18 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-05-13 16:31:30 (GMT) |
commit | e9e95f75e7c1e8325c2acce0087ff8677d773779 (patch) | |
tree | db3efdbefd0c89554cf28b1177fcfd7b5605d840 /src | |
parent | b9f9d811cfb71ab2983f25f3514da958e444de4b (diff) | |
download | Qt-e9e95f75e7c1e8325c2acce0087ff8677d773779.zip Qt-e9e95f75e7c1e8325c2acce0087ff8677d773779.tar.gz Qt-e9e95f75e7c1e8325c2acce0087ff8677d773779.tar.bz2 |
Fix thread safety regression of QNetworkConfigurationManager
Changes in 4.8 led to a timer being created in the wrong thread.
I have restored the invokeMethod used to call startPolling() to solve
this problem.
Reviewed-By: mread
Diffstat (limited to 'src')
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager_p.cpp | 2 | ||||
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager_p.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp index a948d91..42fc49d 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.cpp +++ b/src/network/bearer/qnetworkconfigmanager_p.cpp @@ -488,7 +488,7 @@ void QNetworkConfigurationManagerPrivate::enablePolling() ++forcedPolling; if (forcedPolling == 1) - startPolling(); + QMetaObject::invokeMethod(this, "startPolling"); } void QNetworkConfigurationManagerPrivate::disablePolling() diff --git a/src/network/bearer/qnetworkconfigmanager_p.h b/src/network/bearer/qnetworkconfigmanager_p.h index abc4b9b..45d6a75 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.h +++ b/src/network/bearer/qnetworkconfigmanager_p.h @@ -107,7 +107,7 @@ private Q_SLOTS: void pollEngines(); private: - void startPolling(); + Q_INVOKABLE void startPolling(); QTimer *pollTimer; private: |