summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-11-05 00:01:24 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-11-05 00:41:18 (GMT)
commit69a1fce88bb5f733895cc21758fd398bd650b7a6 (patch)
tree1fd6aa0bdddf3299335ff40463d05ccda3195f94
parent688e0e8615330f1a50ef5a601fac2ce8de5af7d6 (diff)
downloadQt-69a1fce88bb5f733895cc21758fd398bd650b7a6.zip
Qt-69a1fce88bb5f733895cc21758fd398bd650b7a6.tar.gz
Qt-69a1fce88bb5f733895cc21758fd398bd650b7a6.tar.bz2
Fix synchronous dispatch in ICD in non-main threads.
ICD DBus signals always come in via the main thread. During synchronous dispatch these signals were not being emitted when expected because no event loop is running in the destination thread. Fixed by added a call to QCoreApplication::sendPostedEvents(object, QEvent::MetaCall) in the synchronous dispatch loop. Task-number: QTBUG-15004
-rw-r--r--src/plugins/bearer/icd/maemo_icd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/bearer/icd/maemo_icd.cpp b/src/plugins/bearer/icd/maemo_icd.cpp
index 4f879e3..57ab0a8 100644
--- a/src/plugins/bearer/icd/maemo_icd.cpp
+++ b/src/plugins/bearer/icd/maemo_icd.cpp
@@ -508,6 +508,7 @@ uint IcdPrivate::state(QList<IcdStateResult>& state_results)
mInterface.clear();
while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) {
mDBus->synchronousDispatch(1000);
+ QCoreApplication::sendPostedEvents(icd, QEvent::MetaCall);
}
if (time(0)>(started+timeout_secs)) {
@@ -685,6 +686,7 @@ uint IcdPrivate::addrinfo(QList<IcdAddressInfoResult>& addr_results)
mInterface.clear();
while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) {
mDBus->synchronousDispatch(1000);
+ QCoreApplication::sendPostedEvents(icd, QEvent::MetaCall);
}
if (time(0)>(started+timeout_secs)) {