D20489: [KIO] Make it compile without foreach (Step 1)
David Faure
noreply at phabricator.kde.org
Sat Apr 13 11:50:15 BST 2019
dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.
cgiboudeaux: the Qt documentation says that foreach is deprecated, what do you suggest Laurent should add to the commit log? Just "it's deprecated", a copy/paste of the Qt docu, or https://www.kdab.com/goodbye-q_foreach/ ?
INLINE COMMENTS
> globaltest.cpp:110
> const QUrl baseUrl = QUrl::fromLocalFile(dir.path());
> - foreach (const QString &localFile, existingFiles) {
> + for (const QString &localFile : existingFiles) {
> QFile file(dir.path() + '/' + localFile);
qAsConst? I guess QFETCH doesn't make the variables const.
> kdirmodel.cpp:263
> static_cast<KDirModelDirNode *>(node)->collectAllChildUrls(urls);
> - Q_FOREACH (const QUrl &u, urls) {
> + for (const QUrl &u : urls) {
> m_nodeHash.remove(u);
qAsConst
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D20489
To: mlaurent, dfaure
Cc: cgiboudeaux, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190413/976cc55d/attachment.html>
More information about the Kde-frameworks-devel
mailing list