Bug 464368

Summary: qproperty-type-mismatch fails to extract type when Q_PROPERTY( is followed by a whitespace
Product: [Developer tools] clazy Reporter: Eugene Shalygin <eugene.shalygin+bugzilla.kde>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: alexander.lohnau, smartins
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Eugene Shalygin 2023-01-16 11:01:37 UTC
If property is declared as Q_PROPERTY( Type name ... ), clazy derives property type as an empty string. But some code formatting styles require whitespace inside braces :(

STEPS TO REPRODUCE
1.  Insert a whitespace after the opening brace in any Q_PROPERTY declaration

OBSERVED RESULT
Clazy resolves the type of the property to empty string and qproperty-type-mismatch always reports errors.

EXPECTED RESULT
Clazy trims contents of the Q_PROPERTY() macro before parsing.

Clazy from Qt Creator 9.0.1