D25755: Replace iterators with range-based for

2019-12-05 Thread Albert Astals Cid
aacid added a comment. https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html is something you can use if you feel bored, i made it mandatory in poppler REPOSITORY R297 KDED REVISION DETAIL https://phabricator.kde.org/D25755 To: nicolasfella, #frameworks Cc: dhau

D25755: Replace iterators with range-based for

2019-12-05 Thread Dominik Haumann
dhaumann added a comment. >>> Do we dislike iterators now? >> >> We don't, and they still make sense for when you need the `key`, but range for is just much nier to look at :) > > I'm fine with that statement. But are we going to be reviewing changing all the KDE code from iterators

D25755: Replace iterators with range-based for

2019-12-05 Thread Ahmad Samir
ahmadsamir added a subscriber: dfaure. REPOSITORY R297 KDED REVISION DETAIL https://phabricator.kde.org/D25755 To: nicolasfella, #frameworks Cc: dfaure, ahmadsamir, broulik, aacid, apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25755: Replace iterators with range-based for

2019-12-05 Thread Ahmad Samir
ahmadsamir added a comment. If we're going to iterate over a whole container, from cbegin() to cend(), and the container isn't going to change in the loop, then IMHO (H for humble :)) range-for would convey the intention better and make the code slightly easier to read/look cleaner. Kin

D25755: Replace iterators with range-based for

2019-12-05 Thread Aleix Pol Gonzalez
apol added a comment. In D25755#572575 , @broulik wrote: > In D25755#572418 , @apol wrote: > > > Do we dislike iterators now? > > > We don't, and they still make sense for when you need the `key

D25755: Replace iterators with range-based for

2019-12-05 Thread Kai Uwe Broulik
broulik added a comment. In D25755#572418 , @apol wrote: > Do we dislike iterators now? We don't, and they still make sense for when you need the `key`, but range for is just much nier to look at :) REPOSITORY R297 KDED REVISION DETAI

D25755: Replace iterators with range-based for

2019-12-05 Thread Albert Astals Cid
aacid added inline comments. INLINE COMMENTS > kded.cpp:622 > const QStringList dirs = > QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, > QStringLiteral("kconf_update"), QStandardPaths::LocateDirectory); > -for (QStringList::ConstIterator it = dirs.begin(); > -

D25755: Replace iterators with range-based for

2019-12-04 Thread Aleix Pol Gonzalez
apol added a comment. Do we dislike iterators now? REPOSITORY R297 KDED REVISION DETAIL https://phabricator.kde.org/D25755 To: nicolasfella, #frameworks Cc: apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25755: Replace iterators with range-based for

2019-12-04 Thread Nicolas Fella
nicolasfella created this revision. nicolasfella added a reviewer: Frameworks. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. nicolasfella requested review of this revision. TEST PLAN builds, kded starts REPOSITORY R297 KDED BRANCH iter REVISION DETAI