diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2022-02-13 11:54:33 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2022-02-13 11:54:33 +0000 |
commit | 63c1cb8982b78cf329311cec3702e4cbd1f2b2b2 (patch) | |
tree | bbd73f2d6dd27a9aad96138f0075c4dac6d337bb | |
parent | 25e5d50fa881b133acdac4cc4675dadd6f3e6242 (diff) | |
download | gobject-introspection-63c1cb8982b78cf329311cec3702e4cbd1f2b2b2.tar.gz |
Revert "scanner: Mark colliding properties as not introspectable"
This reverts commit 8e85d1ca937c166f07675d02fc84abb27d06ae11.
Marking colliding properties as not introspectable breaks
a bunch of existing API when compiling the GIR into the
typelib, so we'll have to find another solution during the
grace period.
4 files changed, 36 insertions, 4 deletions
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py index 419c3d7e..1a576900 100644 --- a/giscanner/introspectablepass.py +++ b/giscanner/introspectablepass.py @@ -307,7 +307,6 @@ class IntrospectablePass(object): continue if s.name.replace('-', '_') == prop.name.replace('-', '_'): self._property_warning(obj, prop, "Properties cannot have the same name as signals") - prop.introspectable = False return False def _property_method_collision(self, obj, prop): @@ -316,7 +315,6 @@ class IntrospectablePass(object): continue if m.name == prop.name.replace('-', '_'): self._property_warning(obj, prop, "Properties cannot have the same name as methods") - prop.introspectable = False return False def _property_vfunc_collision(self, obj, prop): @@ -325,7 +323,6 @@ class IntrospectablePass(object): continue if vfunc.name == prop.name.replace('-', '_'): self._property_warning(obj, prop, "Properties cannot have the same name as virtual methods") - prop.introspectable = False return False def _introspectable_symbol_collisions(self, obj, stack): diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-name-conflict.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-name-conflict.page new file mode 100644 index 00000000..165ea2fe --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-name-conflict.page @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<page id="Regress.TestObj-name-conflict" + type="topic" + style="property" + xmlns="http://projectmallard.org/1.0/" + xmlns:api="http://projectmallard.org/experimental/api/" + xmlns:ui="http://projectmallard.org/1.0/ui/"> + <info> + <link xref="Regress.TestObj" group="property" type="guide"/> + <title type="link" role="topic">name-conflict</title> + </info> + <title>Regress.TestObj.name_conflict</title> + <synopsis><code mime="text/x-gjs"> +TestObj.name_conflict: Number(gint) (Read / Write / Construct) + </code></synopsis> + + +</page> diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-name-conflict.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-name-conflict.page new file mode 100644 index 00000000..6d02a57c --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-name-conflict.page @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<page id="Regress.TestObj-name-conflict" + type="topic" + style="property" + xmlns="http://projectmallard.org/1.0/" + xmlns:api="http://projectmallard.org/experimental/api/" + xmlns:ui="http://projectmallard.org/1.0/ui/"> + <info> + <link xref="Regress.TestObj" group="property" type="guide"/> + <title type="link" role="topic">name-conflict</title> + </info> + <title>Regress.TestObj:name-conflict</title> + <synopsis><code mime="text/x-python"> +"name-conflict" int : Read / Write / Construct + </code></synopsis> + + +</page> diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index 2374eb8e..99d68271 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -4885,7 +4885,6 @@ raise an error.</doc> </type> </property> <property name="name-conflict" - introspectable="0" writable="1" construct="1" transfer-ownership="none"> |