Skip to content

Commit

Permalink
Fix doxytest on some newer doxygen versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 5, 2024
1 parent 7e6e921 commit dcd45ad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/code_layout/doxygen_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, path, acceptable_missing={}, acceptable_missing_added_note=[]
'QgsSQLStatement::NodeUnaryOperator',
'QgsRuleBasedLabeling::Rule',
'QgsSQLStatement::Visitor']
self.version_regex = re.compile(r'QGIS [\d\.]+.*')
self.version_regex = re.compile(r'.*QGIS\s+(?:<ref.*?>)?[\d\.]+.*', re.MULTILINE)
self.parseFiles(path)

def parseFiles(self, path):
Expand Down Expand Up @@ -257,7 +257,7 @@ def parseClassElem(self, e):
# test for brief description
d = e.find('briefdescription')
has_brief_description = False
if d:
if d is not None:
has_brief_description = True
for para in d.iter('para'):
if para.text and re.search(r'\btodo\b', para.text.lower()) is not None:
Expand All @@ -271,7 +271,7 @@ def parseClassElem(self, e):
for s in para.iter('simplesect'):
if s.get('kind') == 'since':
for p in s.iter('para'):
if self.version_regex.match(p.text):
if self.version_regex.match(ET.tostring(p).decode()):
found_version_added = True
break

Expand Down Expand Up @@ -529,6 +529,8 @@ def isDeprecated(self, member_elem):
decl_deprecated = True
except:
pass
if b'Q_DECL_DEPRECATED' in ET.tostring(type_elem):
decl_deprecated = True

doxy_deprecated = False
has_description = True
Expand Down

0 comments on commit dcd45ad

Please sign in to comment.