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));
}
}
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();
}
}
}
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
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
// 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"));