[vala] Set G_SIGNAL_DEPRECATED on annotated signals
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Set G_SIGNAL_DEPRECATED on annotated signals
- Date: Sat, 28 Jun 2014 10:07:08 +0000 (UTC)
commit 890351d7043d402ae67536db9f82f45dffa45608
Author: Simon Werbeck <simon werbeck gmail com>
Date: Sat Jun 28 01:41:52 2014 +0200
Set G_SIGNAL_DEPRECATED on annotated signals
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 | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagsignalmodule.vala b/codegen/valagsignalmodule.vala
index a350edd..3f8e1ea 100644
--- a/codegen/valagsignalmodule.vala
+++ b/codegen/valagsignalmodule.vala
@@ -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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]