From cad05aaaa116db2e7a326eca73d9167f256b187d Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 15 Apr 2013 12:40:24 -0500 Subject: Fix failure to report DBUS non-fatal errors --- tqdbusconnection.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'tqdbusconnection.cpp') 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; } -- cgit v1.2.1