SUMMARY currently the clazy report doesn't suggest qAsConst fixit directly, it's only suggested in the documentation of the clazy-range-loop warning. OBSERVED RESULT line 468: for (const auto &p : mParameters) => c++11 range-loop might detach Qt container (QVector) EXPECTED RESULT line 468: for (const auto &p : mParameters) => c++11 range-loop might detach Qt container (QVector), use qAsConst(mParameters) SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Qt 5.7 is old enough by now
Git commit 9c8ade0c72a9ca371a0333bccdc297dc20f0643f by Sergio Martins. Committed on 08/05/2019 at 09:46. Pushed by smartins into branch 'master'. range-loop: Specify in the README that we have a fixit for adding qAsConst M +1 -3 docs/checks/README-range-loop.md https://commits.kde.org/clazy/9c8ade0c72a9ca371a0333bccdc297dc20f0643f