[gobject-introspection/matthiasc/symbol-collision] Don't warn for property<>getter collisions




commit 20ab7b5442e0180669ff5d7ad4411c27c55f72f0
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 15 17:55:41 2021 -0400

    Don't warn for property<>getter collisions
    
    These are generally harmless.

 giscanner/introspectablepass.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py
index 84c2c8e5..bf41b75e 100644
--- a/giscanner/introspectablepass.py
+++ b/giscanner/introspectablepass.py
@@ -257,6 +257,8 @@ class IntrospectablePass(object):
             if m.skip or not m.introspectable:
                 continue
             if m.name == prop.name.replace('-', '_'):
+                if prop.attributes and prop.attributes['org.gtk.Property.get'] == m.symbol:
+                    continue
                 self._property_warning(obj, prop, "Properties cannot have the same name as methods")
         return False
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]