D24261: Modernize code: use range-based for loop in more places

2019-10-20 Thread Friedrich W. H. Kossebau
This revision was automatically updated to reflect the committed changes. Closed by commit R263:3836ef74bc2c: Modernize code: use range-based for loop in more places (authored by kossebau). REPOSITORY R263 KXmlGui CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24261?vs=67047&id=68389

D24261: Modernize code: use range-based for loop in more places

2019-10-20 Thread David Faure
dfaure accepted this revision. This revision is now accepted and ready to land. REPOSITORY R263 KXmlGui BRANCH morerangebasedforloops REVISION DETAIL https://phabricator.kde.org/D24261 To: kossebau, dfaure Cc: dhaumann, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D24261: Modernize code: use range-based for loop in more places

2019-10-18 Thread Friedrich W. H. Kossebau
kossebau added a comment. Ping? REPOSITORY R263 KXmlGui REVISION DETAIL https://phabricator.kde.org/D24261 To: kossebau, dfaure Cc: dhaumann, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D24261: Modernize code: use range-based for loop in more places

2019-09-29 Thread Friedrich W. H. Kossebau
kossebau updated this revision to Diff 67047. kossebau added a comment. - move &/* to variable name ' use explicit const REPOSITORY R263 KXmlGui CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24261?vs=66989&id=67047 BRANCH morerangebasedforloops REVISION DETAIL https://

D24261: Modernize code: use range-based for loop in more places

2019-09-28 Thread David Faure
dfaure added inline comments. INLINE COMMENTS > kossebau wrote in kgesture.cpp:131 > Why the sizeof==8 rule? > > Good catch about the 1, slipped me, will drop change here. sizeof(QPoint)==8 indeed, i.e. passing a QPoint by value is like passing two ints by value, which is fine. > kossebau wro

D24261: Modernize code: use range-based for loop in more places

2019-09-28 Thread Friedrich W. H. Kossebau
kossebau updated this revision to Diff 66989. kossebau added a comment. update to @dhaumann's first review: - drop wrong change for loop starting at 1 - use plain array for shortcutTitleToColumnMap REPOSITORY R263 KXmlGui CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24261

D24261: Modernize code: use range-based for loop in more places

2019-09-28 Thread Friedrich W. H. Kossebau
kossebau added a comment. Thanks for review work, @dhaumann :) Seems we have some differences though, so let's try to align knowledge: When it comes to by-value or by reference of the loop range element value, I learned that similar rules as for arguments are valid: small size in bytes

D24261: Modernize code: use range-based for loop in more places

2019-09-27 Thread Dominik Haumann
dhaumann added inline comments. INLINE COMMENTS > kedittoolbar.cpp:1566 > { > -XmlDataList::Iterator xit = m_xmlFiles.begin(); > -for (; xit != m_xmlFiles.end(); ++xit) { > -if ((*xit).type() == XmlData::Merged) { > +for (auto& xmlFile : m_xmlFiles) { > +if (xmlFile.t

D24261: Modernize code: use range-based for loop in more places

2019-09-27 Thread Friedrich W. H. Kossebau
kossebau created this revision. kossebau added a reviewer: dfaure. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. kossebau requested review of this revision. REVISION SUMMARY GIT_SILENT TEST PLAN Test pass, KXMLGUI-based apps showed no regressions incl. e