diff options
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 84d433f2e7..08a8877ad5 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -1873,10 +1873,10 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call) delete call; } -int QDBusConnectionPrivate::send(const QDBusMessage& message) +bool QDBusConnectionPrivate::send(const QDBusMessage& message) { if (QDBusMessagePrivate::isLocal(message)) - return -1; // don't send; the reply will be retrieved by the caller + return true; // don't send; the reply will be retrieved by the caller // through the d_ptr->localReply link QDBusError error; @@ -1900,24 +1900,17 @@ int QDBusConnectionPrivate::send(const QDBusMessage& message) "invalid", qPrintable(message.service()), qPrintable(error.message())); lastError = error; - return 0; + return false; } q_dbus_message_set_no_reply(msg, true); // the reply would not be delivered to anything qDBusDebug() << this << "sending message (no reply):" << message; checkThread(); - bool isOk; - { - QDBusDispatchLocker locker(SendMessageAction, this); - isOk = q_dbus_connection_send(connection, msg, 0); - } - int serial = 0; - if (isOk) - serial = q_dbus_message_get_serial(msg); - + QDBusDispatchLocker locker(SendMessageAction, this); + bool isOk = q_dbus_connection_send(connection, msg, 0); q_dbus_message_unref(msg); - return serial; + return isOk; } // small helper to note long running blocking dbus calls. |