mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 05:45:42 +03:00
Fix container detaching
Found by clazy Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
This commit is contained in:
parent
3ca586c464
commit
1afda2b875
4 changed files with 9 additions and 6 deletions
|
@ -346,7 +346,8 @@ bool ExcludedFiles::reloadExcludeFiles()
|
|||
_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);
|
||||
}
|
||||
|
@ -667,7 +668,8 @@ void ExcludedFiles::prepare()
|
|||
_fullRegexFile.clear();
|
||||
_fullRegexDir.clear();
|
||||
|
||||
for (auto const & basePath : _allExcludes.keys())
|
||||
const auto keys = _allExcludes.keys();
|
||||
for (auto const & basePath : keys)
|
||||
prepare(basePath);
|
||||
}
|
||||
|
||||
|
|
|
@ -182,7 +182,8 @@ void NetworkSettings::saveProxySettings()
|
|||
// start the sync.
|
||||
FolderMan::instance()->setDirtyProxy();
|
||||
|
||||
for (auto account : AccountManager::instance()->accounts()) {
|
||||
const auto accounts = AccountManager::instance()->accounts();
|
||||
for (auto account : accounts) {
|
||||
account->freshConnectionAttempt();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ void WebViewPageUrlSchemeHandler::requestStarted(QWebEngineUrlRequestJob *reques
|
|||
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;
|
||||
|
|
|
@ -331,7 +331,7 @@ void SyncEngine::conflictRecordMaintenance()
|
|||
// 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()) {
|
||||
|
@ -344,7 +344,7 @@ void SyncEngine::conflictRecordMaintenance()
|
|||
//
|
||||
// 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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue