summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusintegrator.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-12-29 19:25:28 -0200
committerThiago Macieira <thiago.macieira@intel.com>2015-09-15 02:08:32 +0000
commitedaf7c30d43e82e662129f55343930f54199ec60 (patch)
tree85e2254199f71ba22c2f68a88a0d4f9e2d3fcd11 /src/dbus/qdbusintegrator.cpp
parent9af53bfc8115eab4a6f46e5b38527ed3b669f3f0 (diff)
Make QDBusConnectionPrivate::send return bool
It used to return the sent message's serial ID, but we never used that. So simply use boolean instead. Change-Id: Ic5d393bfd36e48a193fcffff13b73753ccf47759 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Albert Astals Cid <aacid@kde.org>
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r--src/dbus/qdbusintegrator.cpp19
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.