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