chiark / gitweb /
doxygen: adapt to function declaration location updates in Doxygen master.
authorVladimír Vondruš <mosra@centrum.cz>
Sat, 12 Jan 2019 15:21:11 +0000 (16:21 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 12 Jan 2019 15:32:06 +0000 (16:32 +0100)
doc/doxygen.rst
doxygen/dox2html5.py

index 78e950cb9830a88b56c3a8657f792833eb67704a..085ea2d24c50d14b30b3ce19fe2e5b4c823189e0 100644 (file)
@@ -708,8 +708,9 @@ all :cpp:`#include`-related information:
 .. note-warning:: Doxygen patches
 
     Current stable Doxygen release (1.8.15) doesn't correctly provide location
-    information for function and variable declarations. A fix is submitted in
-    :gh:`doxygen/doxygen#6722`, which is not integrated yet.
+    information for function and variable declarations. A fix is present since
+    :gh:`doxygen/doxygen@7f40e488e27bcea4bb15045df05479dc5fbd9d6d` (formerly
+    :gh:`doxygen/doxygen#6722`).
 
 `Code highlighting`_
 --------------------
index ba290a3f1adc3493d76155f019e8e3852f29ef4f..733c212ef1d1d0eeec49c83515a8d008d0586972 100755 (executable)
@@ -477,7 +477,8 @@ def parse_id_and_include(state: State, element: ET.Element) -> Tuple[str, str, s
     # or a module
     include = None
     if state.current_kind in ['namespace', 'group']:
-        file = element.find('location').attrib['file']
+        location_attribs = element.find('location').attrib
+        file = location_attribs['declfile'] if 'declfile' in location_attribs else location_attribs['file']
         include = make_include(state, file)
 
         # If the include for current namespace is not yet set (empty string)
@@ -2437,7 +2438,8 @@ def parse_xml(state: State, xml: str):
     # namespaces without any members too.
     state.current_kind = compound.kind
     if compound.kind in ['struct', 'class', 'union'] or (compound.kind == 'namespace' and compounddef.find('innerclass') is None and compounddef.find('innernamespace') is None and compounddef.find('sectiondef') is None):
-        file = compounddef.find('location').attrib['file']
+        location_attribs = compounddef.find('location').attrib
+        file = location_attribs['declfile'] if 'declfile' in location_attribs else location_attribs['file']
         compound.include = make_include(state, file)
 
         # Save include for current compound. Every enum/var/function/... parser