]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Set G_SIGNAL_DEPRECATED on annotated signals
authorSimon Werbeck <simon.werbeck@gmail.com>
Fri, 27 Jun 2014 23:41:52 +0000 (01:41 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Sat, 28 Jun 2014 10:05:59 +0000 (12:05 +0200)
When using the [Deprecated] attribute on a signal, the corresponding
signal flag is now set upon signal creation. This requires that
--target-glib is set accordingly

Fixes bug 732381

codegen/valagsignalmodule.vala

index a350edd86c7df3220ffeb64f3679253a4a800149..3f8e1ea1e81c6c087dbab28c2ed63969b27d3c27 100644 (file)
@@ -333,6 +333,10 @@ public class Vala.GSignalModule : GObjectModule {
                        flags += "G_SIGNAL_NO_HOOKS";
                }
 
+               if (sig.get_attribute ("Deprecated") != null && CodeContext.get ().require_glib_version (2, 31)) {
+                       flags += "G_SIGNAL_DEPRECATED";
+               }
+
                csignew.add_argument (new CCodeConstant (string.joinv (" | ", flags)));
 
                if (sig.default_handler == null) {