]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Let method representing property accessor inherit GIR.visible attribute
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 18 Jan 2021 14:38:51 +0000 (15:38 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 18 Jan 2021 14:38:51 +0000 (15:38 +0100)
tests/girwriter/GirTest-1.0.gir-expected
vala/valapropertyaccessor.vala

index abac75dbd60c371d53ecdb63f07ab6895c703d8b..06105bbaf0dbdf23fa2bf34eb071984823a8e3e7 100644 (file)
                <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>
index 0c1bf50b34456954ed2304961cc4128bcf3c543e..393284301b4f8d97618ad943d48de41b0c34c9ab 100644 (file)
@@ -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;