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
(cherry picked from commit e9e95f75e7c1e8325c2acce0087ff8677d773779)

Change-Id: I8b89fa89766679beb2d469f9bbd1f5e2233f061b
Reviewed-on: http://codereview.qt.nokia.com/138
Reviewed-by: Markus Goetz
bb10
Shane Kearns 2011-05-13 16:19:18 +01:00 committed by Qt Continuous Integration System
parent dd4b997c58
commit 785905a1f4
2 changed files with 2 additions and 2 deletions

View File

@ -488,7 +488,7 @@ void QNetworkConfigurationManagerPrivate::enablePolling()
++forcedPolling;
if (forcedPolling == 1)
startPolling();
QMetaObject::invokeMethod(this, "startPolling");
}
void QNetworkConfigurationManagerPrivate::disablePolling()

View File

@ -107,7 +107,7 @@ private Q_SLOTS:
void pollEngines();
private:
void startPolling();
Q_INVOKABLE void startPolling();
QTimer *pollTimer;
private: