generic: const-ify iterator values where possible

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-10-30 04:46:13 +02:00
parent e9eea95697
commit edf69d20e9
2 changed files with 2 additions and 2 deletions

View file

@ -159,7 +159,7 @@ void KWinTabBoxConfig::initLayoutLists()
KService::List offers = trader->query("KWin/WindowSwitcher");
QStringList layoutNames, layoutPlugins, layoutPaths;
foreach (KService::Ptr service, offers) {
foreach (const KService::Ptr service, offers) {
const QString pluginName = service->property("X-KDE-PluginInfo-Name").toString();
if (service->property("X-Plasma-API").toString() != "declarativeappletscript") {
continue;

View file

@ -360,7 +360,7 @@ void Processes::deleteProcess(long pid)
Process *process = d->mProcesses.value(pid);
if(!process)
return;
Q_FOREACH( Process *it, process->children) {
Q_FOREACH(const Process *it, process->children) {
d->mProcessedLastTime.remove(it->pid);
deleteProcess(it->pid);
}