summaryrefslogtreecommitdiffstats
path: root/tqdbusconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqdbusconnection.cpp')
-rw-r--r--tqdbusconnection.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/tqdbusconnection.cpp b/tqdbusconnection.cpp
index 1af78f5..a1a9b56 100644
--- a/tqdbusconnection.cpp
+++ b/tqdbusconnection.cpp
@@ -290,14 +290,9 @@ TQT_DBusMessage TQT_DBusConnection::sendWithReply(const TQT_DBusMessage &message
TQT_DBusMessage ret = TQT_DBusMessage::fromDBusMessage(reply);
- // HACK
- // Reset the error object if no error was reported by DBus
- // This is needed because TQT_DBusMessage::fromDBusMessage sometimes sets the error object even if DBus did not report a fatal error,
- // and the dbus_error_is_set() check cannot be moved inside fromDBusMessage() without breaking the API and ABI.
- if (!dbus_error_is_set(&d->error)) {
- ret.d->error = TQT_DBusError();
- if (error) *error = TQT_DBusError();
- }
+ bool dbus_error_set = dbus_error_is_set(&d->error);
+ ret.d->error.setDBUSError(dbus_error_set);
+ if (error) error->setDBUSError(dbus_error_set);
return ret;
}