summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-05-18 18:15:36 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-05-23 07:49:40 (GMT)
commitcafd53ce84b13085fe2b594bf42bed533e26a3e8 (patch)
tree8d013111142d7d25feb0fba8e4011900ec779e26 /src/dbus
parentb5f1a55c3112f46f27e2306fac7d93bde96152e6 (diff)
downloadQt-cafd53ce84b13085fe2b594bf42bed533e26a3e8.zip
Qt-cafd53ce84b13085fe2b594bf42bed533e26a3e8.tar.gz
Qt-cafd53ce84b13085fe2b594bf42bed533e26a3e8.tar.bz2
QDBusAbstractInterface: don't set lastError outside the object's own thread
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbusabstractinterface.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index 1a7c417..4e9c1ad 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -42,6 +42,8 @@
#include "qdbusabstractinterface.h"
#include "qdbusabstractinterface_p.h"
+#include <qthread.h>
+
#include "qdbusargument.h"
#include "qdbuspendingcall.h"
#include "qdbusmessage_p.h"
@@ -440,7 +442,8 @@ QDBusMessage QDBusAbstractInterface::callWithArgumentList(QDBus::CallMode mode,
msg.setArguments(args);
QDBusMessage reply = d->connection.call(msg, mode);
- d->lastError = reply; // will clear if reply isn't an error
+ if (thread() == QThread::currentThread())
+ d->lastError = reply; // will clear if reply isn't an error
// ensure that there is at least one element
if (reply.arguments().isEmpty())