mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Fixes
This commit is contained in:
parent
d990de3369
commit
76f95779de
@ -1903,10 +1903,10 @@ while line_idx < line_count:
|
|||||||
pattern = r'^\s*(?:const |virtual |static |inline )*(?!explicit)([(?:long )\w:]+(?:<.*?>)?)\s+(?:\*|&)?(?:\w+|operator.{1,2})\(.*$'
|
pattern = r'^\s*(?:const |virtual |static |inline )*(?!explicit)([(?:long )\w:]+(?:<.*?>)?)\s+(?:\*|&)?(?:\w+|operator.{1,2})\(.*$'
|
||||||
match = re.match(pattern, LINE)
|
match = re.match(pattern, LINE)
|
||||||
if match:
|
if match:
|
||||||
return_type = match.group(1)
|
return_type_candidate = match.group(1)
|
||||||
if not re.search(r'(void|SIP_PYOBJECT|operator|return|QFlag)', return_type):
|
if not re.search(r'(void|SIP_PYOBJECT|operator|return|QFlag)', return_type_candidate):
|
||||||
# replace :: with . (changes c++ style namespace/class directives to Python style)
|
# replace :: with . (changes c++ style namespace/class directives to Python style)
|
||||||
return_type = return_type.replace('::', '.')
|
return_type = return_type_candidate.replace('::', '.')
|
||||||
# replace with builtin Python types
|
# replace with builtin Python types
|
||||||
return_type = re.sub(r'\bdouble\b', 'float', return_type)
|
return_type = re.sub(r'\bdouble\b', 'float', return_type)
|
||||||
return_type = re.sub(r'\bQString\b', 'str', return_type)
|
return_type = re.sub(r'\bQString\b', 'str', return_type)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user