summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2014-06-27 23:10:17 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2014-06-27 23:15:59 +0100
commit6750997659149e26a73718266f2022903992bb95 (patch)
tree4c22bdb3fdf6344b857fd34cbd230d25b887545d /tests
parentd395a38afc6410bc9d60f501745300305e137b37 (diff)
gsignal: Add support for signals defined on interfaces
Previously the checker would not find the information about a signal which was defined on an interface implemented by the dynamic instance object (or one of its superclasses).
Diffstat (limited to 'tests')
-rw-r--r--tests/gsignal-connect.c21
-rw-r--r--tests/gsignal.head.c15
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/gsignal-connect.c b/tests/gsignal-connect.c
index ea8ea6b..ea9e7bb 100644
--- a/tests/gsignal-connect.c
+++ b/tests/gsignal-connect.c
@@ -323,3 +323,24 @@
g_signal_connect_swapped (app, "activate",
G_CALLBACK (g_object_run_dispose), some_object);
}
+
+/*
+ * No error
+ */
+{
+ // Connecting to a signal defined on an interface.
+ GDBusObject *obj = g_malloc (5); // only checking the type
+ g_signal_connect (obj, "interface-added",
+ (GCallback) dbus_object_interface_added_cb, NULL);
+}
+
+/*
+ * No error
+ */
+{
+ // Connecting to a signal defined on an interface implemented by the
+ // object.
+ GDBusObjectProxy *proxy = g_malloc (5); // only checking the type
+ g_signal_connect (proxy, "interface-added",
+ (GCallback) dbus_object_interface_added_cb, NULL);
+}
diff --git a/tests/gsignal.head.c b/tests/gsignal.head.c
index ec6e6d0..c6b70ef 100644
--- a/tests/gsignal.head.c
+++ b/tests/gsignal.head.c
@@ -119,6 +119,21 @@ application_activate_swapped_excess_arguments_cb (GSettings *self,
/* Done */
}
+static void
+dbus_object_interface_added_cb (GDBusObject *obj, GDBusInterface *iface,
+ gpointer user_data)
+{
+ /* Done */
+}
+
+static void
+dbus_object_proxy_interface_added_cb (GDBusObjectProxy *obj,
+ GDBusInterface *iface,
+ gpointer user_data)
+{
+ /* Done */
+}
+
int
main (void)
{