summaryrefslogtreecommitdiffstats
path: root/tqdbusconnection.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-15 12:40:24 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-15 12:40:24 -0500
commitcad05aaaa116db2e7a326eca73d9167f256b187d (patch)
tree1c402a1d378b625db7b055501eb0299d79a1017e /tqdbusconnection.cpp
parent6dd1ccf1d36456f863eb6c0f0acc564f78fc5da8 (diff)
downloaddbus-1-tqt-cad05aaaa116db2e7a326eca73d9167f256b187d.tar.gz
dbus-1-tqt-cad05aaaa116db2e7a326eca73d9167f256b187d.zip
Fix failure to report DBUS non-fatal errors
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;
}