mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: replace Q_FOREACH and foreach by range base for
Q_FOREACH and foreach are anachronisms. Range based for may cause a performance regression: it can lead to a copy of shared containers (one reason why Qt's COW containers are broken). However, as long as there is no user noticeable delay, there is no point in analyzing each case. And also no point in slapping an 'asConst' on every container that is looped over. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
41cb916060
commit
5ac64ab2cd
16 changed files with 32 additions and 35 deletions
|
@ -55,7 +55,7 @@ void set_bundled_templates_as_read_only()
|
|||
listStats[i] = stats + QDir::separator() + listStats.at(i);
|
||||
list += listStats;
|
||||
|
||||
foreach (const QString& f, list)
|
||||
for (const QString &f: list)
|
||||
QFile::setPermissions(pathUser + QDir::separator() + f, QFileDevice::ReadOwner | QFileDevice::ReadUser);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue