D23813: Port away from foreach loops over arguments without calls to owner class

David Faure noreply at phabricator.kde.org
Tue Sep 10 20:51:26 BST 2019


dfaure accepted this revision.
dfaure added a comment.
This revision is now accepted and ready to land.


  (Thread usage is completely unlikely in users of this code, on the containers being passed in, this is really 100% GUI code; it's up to the caller to synchronize this correctly anyway, in that unlikely event...)

INLINE COMMENTS

> kkeysequencewidget.cpp:127
> +        for (auto it = shortcuts.begin(), end = shortcuts.end(); it != end; ++it) {
> +            const QKeySequence &seq = it.key();
> +            for (const KGlobalShortcutInfo &info : it.value()) {

This could even be `const QString seq = it.key().toString();` so that toString() is only called once.

REPOSITORY
  R263 KXmlGui

BRANCH
  portmoreforeachmethodargswithotrecursivecalls

REVISION DETAIL
  https://phabricator.kde.org/D23813

To: kossebau, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190910/ca3edc05/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list