_fullRegexDir.clear();
bool success = true;
- for (const auto& basePath : _excludeFiles.keys()) {
+ const auto keys = _excludeFiles.keys();
+ for (const auto& basePath : keys) {
for (const auto& file : _excludeFiles.value(basePath)) {
success = loadExcludeFile(basePath, file);
}
_fullRegexFile.clear();
_fullRegexDir.clear();
- for (auto const & basePath : _allExcludes.keys())
+ const auto keys = _allExcludes.keys();
+ for (auto const & basePath : keys)
prepare(basePath);
}
// start the sync.
FolderMan::instance()->setDirtyProxy();
- for (auto account : AccountManager::instance()->accounts()) {
+ const auto accounts = AccountManager::instance()->accounts();
+ for (auto account : accounts) {
account->freshConnectionAttempt();
}
}
QUrl url = request->requestUrl();
QString path = url.path(0).mid(1); // get undecoded path
- QStringList parts = path.split("&");
+ const QStringList parts = path.split("&");
QString server;
QString user;
// Remove stale conflict entries from the database
// by checking which files still exist and removing the
// missing ones.
- auto conflictRecordPaths = _journal->conflictRecordPaths();
+ const auto conflictRecordPaths = _journal->conflictRecordPaths();
for (const auto &path : conflictRecordPaths) {
auto fsPath = _propagator->getFilePath(QString::fromUtf8(path));
if (!QFileInfo(fsPath).exists()) {
//
// This happens when the conflicts table is new or when conflict files
// are downlaoded but the server doesn't send conflict headers.
- for (const auto &path : _seenFiles) {
+ for (const auto &path : qAsConst(_seenFiles)) {
if (!Utility::isConflictFile(path))
continue;