diff --git a/kcms/autostart/autostart.cpp b/kcms/autostart/autostart.cpp --- a/kcms/autostart/autostart.cpp +++ b/kcms/autostart/autostart.cpp @@ -222,7 +222,7 @@ //add scripts - foreach (const QString& path, m_paths) { + for (const QString& path : qAsConst(m_paths)) { QDir d(path); if (!d.exists()) d.mkpath(path);