diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-02-23 11:03:13 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-02-23 12:26:47 +0100 |
commit | 81cd88dbbe2adab24cb78cfe313486fcd6e57171 (patch) | |
tree | 6b1bf6009b65e8513186e18f2aa9e2275e8457f3 /sources/pyside6/doc | |
parent | 8eb16d198d189b2ca4e7e400ba45626471e0e982 (diff) |
Documentation: Fix broken inheritance diagrams
After the fixes for PYSIDE-2215 (Intersphinx), the functions fixing
the URLs do more harm than good. Remove them.
Task-number: PYSIDE-2215
Change-Id: I3324edd149cb7c5f3645c30069c46d5dc5f9d223
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/doc')
-rw-r--r-- | sources/pyside6/doc/inheritance_diagram.py | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/sources/pyside6/doc/inheritance_diagram.py b/sources/pyside6/doc/inheritance_diagram.py index 9150ea54b..e972fac4c 100644 --- a/sources/pyside6/doc/inheritance_diagram.py +++ b/sources/pyside6/doc/inheritance_diagram.py @@ -108,27 +108,6 @@ def get_graph_hash(node): return md5(hashString.encode('utf-8')).hexdigest()[-10:] -def fix_class_name(name): - """Fix duplicated modules 'PySide6.QtCore.PySide6.QtCore.QObject'""" - mod_pos = name.rfind('.PySide') - return name[mod_pos + 1:] if mod_pos != -1 else name - - -def expand_ref_uri(uri): - """Fix a ref URI like 'QObject.html#PySide6.QtCore.PySide6.QtCore.QObject' - to point from the image directory back to the HTML directory.""" - anchor_pos = uri.find('#') - if anchor_pos == -1: - return uri - # Determine the path from the anchor "#PySide6.QtCore.PySide6.QtCore.QObject" - class_name = fix_class_name(uri[anchor_pos + 1:]) - path = '../' - modules = class_name.split('.') - for m in range(min(2, len(modules))): - path += f'{modules[m]}/' - return path + uri[:anchor_pos] # Strip anchor - - def html_visit_inheritance_diagram(self, node): """ Output the graph for HTML. This will insert a PNG with clickable @@ -145,7 +124,7 @@ def html_visit_inheritance_diagram(self, node): ref_title = child.get('reftitle') uri = child.get('refuri') if uri and ref_title: - urls[fix_class_name(ref_title)] = expand_ref_uri(uri) + urls[ref_title] = uri dotcode = graph.generate_dot(name, urls, env=self.builder.env) render_dot_html(self, node, dotcode, {}, 'inheritance', 'inheritance', |