D23597: Bulk port away from foreach
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Sat Aug 31 18:33:11 BST 2019
kossebau added a comment.
Thanks for review @dhaumann :) Well, if you like I can give KTextEditor a try, motivated there with my KDevelop hat on :) Let's see when I am sleepless at the computer next time ;)
INLINE COMMENTS
> dhaumann wrote in fonthelpers.cpp:97
> Optionally, you could even write:
>
> static const auto genericNames = {
> QLatin1String("..."), ...
> };
>
> This initializer list will then even not require any memory allocation. You don't have.contains() later, though... You'd need to simply use std::find() semantics.
Yes, it was the contains() which was my motivation here to stay with QStringList.
> dhaumann wrote in kfontsizeaction.cpp:93
> Imho here `qAsConst(actions())` would be nicer to avoid this->.
Will test is this works, but IIRC actions() returned a normal left-side value thingie, which qAsConst does not want to take.
> dhaumann wrote in kviewstateserializer.h:134
> I think `fir` does not compile, does it?
That was... left as exercise for the person copying the code from the docs ;) Alright, not. Well spotted.
REPOSITORY
R236 KWidgetsAddons
REVISION DETAIL
https://phabricator.kde.org/D23597
To: kossebau, #frameworks, cfeck
Cc: dhaumann, 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/20190831/6af8f64f/attachment.html>
More information about the Kde-frameworks-devel
mailing list