apol added a comment.
It's bad enough that we need to give things names because Qt keeps detaching on foreach, I'd be giving at least more semantic names to these temporary variables. INLINE COMMENTS > coronatest.cpp:149 > > - foreach (auto cont, m_corona->containments()) { > + const auto lst = m_corona->containments(); > + for (auto cont : lst) { maybe call it containments? naming variables with a typename is bad (we even are using auto to not mention it's a list!) > datamodel.cpp:401 > if (list.first().canConvert<QVariantMap>()) { > - foreach (const QVariant &item, list) { > + for (const QVariant &item : qAsConst(list)) { > const QVariantMap &vh = item.value<QVariantMap>(); It already is const. > pluginloader.cpp:567 > //info.service() to be valid and would crash otherwise > - foreach (auto& md, plugins) { > + for (auto& md : plugins) { > auto pi = md.metaDataFileName().endsWith(QLatin1String(".json")) ? > KPluginInfo(md) : > KPluginInfo(KService::serviceByStorageId(md.metaDataFileName())); shouldn't it be const? REPOSITORY R242 Plasma Framework (Library) REVISION DETAIL https://phabricator.kde.org/D19913 To: mlaurent, dfaure Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns