[vala/0.48] vala: Let method representing property accessor inherit GIR.visible attribute
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] vala: Let method representing property accessor inherit GIR.visible attribute
- Date: Sun, 28 Feb 2021 17:26:24 +0000 (UTC)
commit 023ab0826391c42ec3dc023fad85bd74b53ddb34
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Jan 18 15:38:51 2021 +0100
vala: Let method representing property accessor inherit GIR.visible attribute
tests/girwriter/GirTest-1.0.gir-expected | 4 ++--
vala/valapropertyaccessor.vala | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/tests/girwriter/GirTest-1.0.gir-expected b/tests/girwriter/GirTest-1.0.gir-expected
index 18a233397..b69eeffb3 100644
--- a/tests/girwriter/GirTest-1.0.gir-expected
+++ b/tests/girwriter/GirTest-1.0.gir-expected
@@ -713,12 +713,12 @@
<property name="skipped-property" writable="1" construct="1" introspectable="0">
<type name="utf8" c:type="gchar*"/>
</property>
- <method name="get_skipped_property" c:identifier="gir_test_object_test_get_skipped_property">
+ <method name="get_skipped_property" c:identifier="gir_test_object_test_get_skipped_property"
introspectable="0">
<return-value transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</return-value>
</method>
- <method name="set_skipped_property" c:identifier="gir_test_object_test_set_skipped_property">
+ <method name="set_skipped_property" c:identifier="gir_test_object_test_set_skipped_property"
introspectable="0">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala
index 5f477b0e4..244f576a7 100644
--- a/vala/valapropertyaccessor.vala
+++ b/vala/valapropertyaccessor.vala
@@ -134,6 +134,9 @@ public class Vala.PropertyAccessor : Subroutine {
m.is_abstract = prop.is_abstract;
m.is_virtual = prop.is_virtual;
m.this_parameter = prop.this_parameter;
+
+ // Inherit important attributes
+ m.copy_attribute_bool (prop, "GIR", "visible");
}
return m;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]