Bug 407322

Summary: suggest to use QRegularExpressionMatch::capturedRef
Product: [Developer tools] clazy Reporter: Milian Wolff <mail>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: REPORTED ---    
Severity: wishlist CC: smartins
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Milian Wolff 2019-05-08 07:30:52 UTC
SUMMARY
suggest usage of QRegularExpressionMatch::capturedRef when the returned value is only used temporarily

STEPS TO REPRODUCE
const QRegularExpression expr;
const auto match = expr.match({});
match.captured(0).mid(1).toInt();

OBSERVED RESULT
we get a suggestion to use midRef instead of mid but no suggestion to use capturedRef

EXPECTED RESULT
also suggest usage of capturedRef

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION