From: Matthieu Gallien Date: Tue, 15 Nov 2022 10:52:25 +0000 (+0100) Subject: tidy some loop related code: avoid one letter variable names X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~130^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=26fd4d222678015515439da5ba5c41d5f8e0d6c9;p=nextcloud-desktop.git tidy some loop related code: avoid one letter variable names Signed-off-by: Matthieu Gallien --- diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index 98184ed3c..003129507 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -1428,12 +1428,12 @@ void FolderMan::slotWipeFolderForAccount(AccountState *accountState) void FolderMan::setDirtyProxy() { const auto folderMapValues = _folderMap.values(); - for (const Folder *f : folderMapValues) { - if (f) { - if (f->accountState() && f->accountState()->account() - && f->accountState()->account()->networkAccessManager()) { + for (const auto folder : folderMapValues) { + if (folder) { + if (folder->accountState() && folder->accountState()->account() + && folder->accountState()->account()->networkAccessManager()) { // Need to do this so we do not use the old determined system proxy - f->accountState()->account()->networkAccessManager()->setProxy( + folder->accountState()->account()->networkAccessManager()->setProxy( QNetworkProxy(QNetworkProxy::DefaultProxy)); } } @@ -1443,10 +1443,10 @@ void FolderMan::setDirtyProxy() void FolderMan::setDirtyNetworkLimits() { const auto folderMapValues = _folderMap.values(); - for (Folder *f : folderMapValues) { + for (auto folder : folderMapValues) { // set only in busy folders. Otherwise they read the config anyway. - if (f && f->isBusy()) { - f->setDirtyNetworkLimits(); + if (folder && folder->isBusy()) { + folder->setDirtyNetworkLimits(); } } } diff --git a/test/testallfilesdeleted.cpp b/test/testallfilesdeleted.cpp index 90b8a1eba..e3e3de50c 100644 --- a/test/testallfilesdeleted.cpp +++ b/test/testallfilesdeleted.cpp @@ -71,8 +71,8 @@ private slots: auto &modifier = deleteOnRemote ? fakeFolder.remoteModifier() : fakeFolder.localModifier(); const auto childrenKeys = fakeFolder.currentRemoteState().children.keys(); - for (const auto &s : childrenKeys) { - modifier.remove(s); + for (const auto &key : childrenKeys) { + modifier.remove(key); } QVERIFY(!fakeFolder.syncOnce()); // Should fail because we cancel the sync @@ -113,8 +113,8 @@ private slots: auto &modifier = deleteOnRemote ? fakeFolder.remoteModifier() : fakeFolder.localModifier(); const auto childrenKeys = fakeFolder.currentRemoteState().children.keys(); - for (const auto &s : childrenKeys) { - modifier.remove(s); + for (const auto &key : childrenKeys) { + modifier.remove(key); } QVERIFY(fakeFolder.syncOnce()); // Should succeed, and all files must then be deleted diff --git a/test/testsyncconflict.cpp b/test/testsyncconflict.cpp index 2d78aad96..a12b47645 100644 --- a/test/testsyncconflict.cpp +++ b/test/testsyncconflict.cpp @@ -80,8 +80,8 @@ private slots: // Verify that the conflict names don't have the user name const auto conflicts = findConflicts(fakeFolder.currentLocalState().children["A"]); - for (const auto &name : conflicts) { - QVERIFY(!name.contains(fakeFolder.syncEngine().account()->davDisplayName())); + for (const auto &conflict : conflicts) { + QVERIFY(!conflict.contains(fakeFolder.syncEngine().account()->davDisplayName())); } QVERIFY(expectAndWipeConflict(fakeFolder.localModifier(), fakeFolder.currentLocalState(), "A/a1"));