D26438: Runners: Convert foreach to for

Méven Car noreply at phabricator.kde.org
Mon Jan 6 12:30:13 GMT 2020


meven added a comment.


  In D26438#588598 <https://phabricator.kde.org/D26438#588598>, @ivan wrote:
  
  > @davidedmundson
  >
  > Yes, the wrapper just serves for keyval iterators to be usable with a range-based for loop. Quite useful if there are a lot of these. In this case, where it is only one loop I agree it might be an overkill.
  
  
  I wish your wrapper was part of Qt directly to avoid boilerplate and give a simpler more idimatic way to get a key/value iteration.
  
  > @meven
  > 
  > Just a single nit-pick left :)
  
  You suggestion does not work (or at least QtCreator does not allow me to write like you suggested).
  entry here is a `QKeyValueIterator` that needs to be dereferenced using `std::pair<Key, T> QKeyValueIterator::operator*()` to get its underlining `std::pair`.

REPOSITORY
  R120 Plasma Workspace

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

To: meven, #plasma, davidedmundson, ivan
Cc: ivan, davidedmundson, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200106/5af66688/attachment-0001.html>


More information about the Plasma-devel mailing list