]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Include sender-type parameter to prototype-string of signal-delegates
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 10 Sep 2017 13:48:53 +0000 (15:48 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 19 Nov 2017 13:16:07 +0000 (14:16 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=787521

vala/valacallabletype.vala

index 1646b44360490b3021079f6014b92c8e0bdef2d8..0642fa644f30c92b5813d8065c480dc1833eaf03 100644 (file)
@@ -44,6 +44,15 @@ public abstract class Vala.CallableType : DataType {
                // Append parameter-list
                builder.append_c ('(');
                int i = 1;
+               // add sender parameter for internal signal-delegates
+               var delegate_type = this as DelegateType;
+               if (delegate_type != null) {
+                       var delegate_symbol = delegate_type.delegate_symbol;
+                       if (delegate_symbol.parent_symbol is Signal && delegate_symbol.sender_type != null) {
+                               builder.append (delegate_symbol.sender_type.to_qualified_string ());
+                               i++;
+                       }
+               }
                foreach (Parameter param in get_parameters ()) {
                        if (i > 1) {
                                builder.append (", ");