Details
- Reviewers
sandsmark mglb tcanabrava - Group Reviewers
Konsole
Diff Detail
- Repository
- R319 Konsole
- Branch
- removeForeach
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 11722 Build 11740: arc lint + arc unit
Thanks for doing this - I was going to eventually get around to it.
Note that this generates a lot of these warnings
warning: c++11 range-loop might detach Qt container (QList) [-Wclazy-range-loop]
I’ll look the warnings, none of them appear on Gcc. Should be a clazy
warning
Em sáb, 11 de mai de 2019 às 16:28, Kurt Hindenburg <
noreply@phabricator.kde.org> escreveu:
hindenburg added a comment. View Revision
https://phabricator.kde.org/D21123Thanks for doing this - I was going to eventually get around to it.
Note that this generates a lot of these warnings
warning: c++11 range-loop might detach Qt container (QList)
[-Wclazy-range-loop]*REPOSITORY*
R319 Konsole*REVISION DETAIL*
https://phabricator.kde.org/D21123*To: *tcanabrava, Konsole, hindenburg, sandsmark
*Cc: *konsole-devel, gennad, thsurrel, ngraham, maximilianocuria,
hindenburg
You'll have to throw in a bunch of qAsConst() to silence clazy and the code ends up less readable imho. So I actually like Q_FOREACH better if you want to make clazy shut up as well (but in general I think clazy is a bit too triggerhappy, readable code is more important than fast code, if it is too slow you bring out a profiler and fix where the problems are).
You can't turn QT_NO_FOREACH on without bumping KF5 version - some headers (e.g. kconfiggroup.h in KF5 Config 5.47) use Q_FOREACH.
@sandsmark: Q_FOREACH/foreach is "discouraged"/deprecated, we'll have to change it in the future anyway.