D23902: [KCoreDirLister] replace deprecated foreach with range-for
David Faure
noreply at phabricator.kde.org
Fri Oct 4 15:23:08 BST 2019
dfaure added a comment.
For the record, JFBastien was actually wrong. Calling .begin() on a const return value does call the const overload. Testcase http://www.davidfaure.fr/kde/const_retval.cpp
But returning const QList would inhibit move semantics, e.g. `QList<int> mylist = foo();` copies instead of moving.
So yeah, better not do that.
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/20191004/da9628b4/attachment.html>
More information about the Kde-frameworks-devel
mailing list