D19551: [knotifications] compile without foreach

David Faure noreply at phabricator.kde.org
Tue Mar 5 21:39:49 GMT 2019


dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> knotifyconfig.cpp:53
>      QCache<QString, KSharedConfig::Ptr> &cache = *static_cache;
> -    Q_FOREACH (const QString &filename, cache.keys()) {
> +    const auto listFiles =  cache.keys();
> +    for (const QString &filename : listFiles) {

horribly slow, should use STL iterators

> notifybypopup.cpp:423
>      }
> -    Q_FOREACH (KNotification *n, d->passivePopups.keys()) {
> +    const auto notificationList = d->passivePopups.keys();
> +    for (KNotification *n : notificationList) {

same

REPOSITORY
  R289 KNotifications

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

To: mlaurent, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190305/8c51b83a/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list