Bug 474314 - new check: detect use of Q_FOREACH and replace by C++11 for each
Summary: new check: detect use of Q_FOREACH and replace by C++11 for each
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-08 21:10 UTC by gruenich (Christoph Grüninger)
Modified: 2023-09-08 21:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gruenich (Christoph Grüninger) 2023-09-08 21:10:59 UTC
Qt discouraged the use of the Q_FOREACH macro since Qt 5.7 and suggests switching to C++-11 range-based for loop.

A new check could detect the use of Q_FOREACH. Further, it might be automatically replaced by a suitable C++-11 range-based for loop.

Link to Q_FOREACH documentation: https://doc.qt.io/qt-6/qforeach-proxy.html