D23902: [KCoreDirLister] replace deprecated foreach with range-for

Ahmad Samir noreply at phabricator.kde.org
Tue Sep 17 23:48:56 BST 2019


ahmadsamir marked 10 inline comments as done.
ahmadsamir added a comment.


  I think I got all the bits I missed before (sorry about the mess).
  
  But I'll sleep on it anyway, will submit in the morning (usually I find mistakes in my code when I look at it again in the morning).
  
  Thanks.

INLINE COMMENTS

> dfaure wrote in kcoredirlister.cpp:833
> Well, then you need a local const variable here.

Right. canonicalUrls can change while iterating (me stupid).

> dfaure wrote in kcoredirlister.cpp:2248
> Why did you remove the const in front of "auto kend"?
> 
> [alternatively, the next line could be ported to a range for, I guess]

I'll revert this bit altogether, I shouldn't have changed it at all.

And I will submit a separate patch to use a range for, for it.

> dfaure wrote in kcoredirlister.cpp:2222
> Did you forget to change it to `qAsConst(listDirs)` ?

It looks like this loop doesn't change lstDirs; or do you mean I should use qAsConst just in case?

REPOSITORY
  R241 KIO

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

To: ahmadsamir, kde-frameworks-devel, 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/20190917/569a9a19/attachment.html>


More information about the Kde-frameworks-devel mailing list