Port from iterators to range-based for
Needs ReviewPublic

Authored by nicolasfella on Apr 20 2020, 9:11 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

Makes nicer code

Diff Detail

Repository
R351 KSystemLog
Branch
for
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25559
Build 25577: arc lint + arc unit
nicolasfella requested review of this revision.Apr 20 2020, 9:11 PM
nicolasfella created this revision.
apol added a subscriber: apol.May 18 2020, 9:50 PM

I guess we're doing it for readability in sacrifice of simplicity or performance which admittedly is probably meaningless here.

If that's what you're after I'll happily accept the patch but I'd first like to know.

src/loggerDialog.cpp
64

You can iterate the priorities then you don't need to create teh QList<QString> at all.

80

Here the right thing to do would be to iterate through facilities rather than the facilities keys and you'd save instantiating the list.