summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusabstractinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus/qdbusabstractinterface.cpp')
-rw-r--r--src/dbus/qdbusabstractinterface.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index 48ec3b6..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"
@@ -51,6 +53,8 @@
#include <qdebug.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
static QDBusError checkIfValid(const QString &service, const QString &path,
@@ -438,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())
@@ -765,4 +770,6 @@ QDBusMessage QDBusAbstractInterface::internalConstCall(QDBus::CallMode mode,
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
+
#include "moc_qdbusabstractinterface.cpp"