summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2015-09-21 08:44:05 +0200
committerMurray Cumming <murrayc@murrayc.com>2015-09-21 08:44:06 +0200
commitece1463f6d796c7c74da1e9d37a4e69904a9706e (patch)
tree702320f09d9657587287072cfeb4642995e5e917
parent5669d4ea13a47604b277d7af2740f2c7d4856d9f (diff)
downloadglibmm-ece1463f6d796c7c74da1e9d37a4e69904a9706e.tar.gz
DBus::Connection::signal_subscribe(): Pass nullptr instead of "".
Because that's what the C documentation requires, and the implementation doesn't accept "" to mean the same thing, though that would be convenient: https://developer.gnome.org/gio/stable/GDBusConnection.html#g-dbus-connection-signal-subscribe Noticed by Christof Meerwald on gtkmm-list.
-rw-r--r--gio/src/dbusconnection.ccg8
1 files changed, 6 insertions, 2 deletions
diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg
index 0e9faf67..935a5d6a 100644
--- a/gio/src/dbusconnection.ccg
+++ b/gio/src/dbusconnection.ccg
@@ -807,8 +807,12 @@ guint Connection::signal_subscribe(
{
auto slot_copy = new SlotSignal(slot);
- return g_dbus_connection_signal_subscribe(gobj(), sender.c_str(),
- interface_name.c_str(), member.c_str(), object_path.c_str(), arg0.c_str(),
+ return g_dbus_connection_signal_subscribe(gobj(),
+ (sender.empty() ? nullptr : sender.c_str()),
+ (interface_name.empty() ? nullptr : interface_name.c_str()),
+ (member.empty() ? nullptr : member.c_str()),
+ (object_path.empty() ? nullptr : object_path.c_str()),
+ (arg0.empty() ? nullptr : arg0.c_str()),
static_cast<GDBusSignalFlags>(flags),
&DBusConnection_Signal_giomm_callback, slot_copy,
&DBusConnection_Signal_giomm_callback_destroy);