AccountPtr account = _accountState->account();
QUrl safeUrl(account->url());
safeUrl.setPassword(QString()); // Remove the password from the URL to avoid showing it in the UI
- const auto &folders = FolderMan::instance()->map().values();
+ const auto folders = FolderMan::instance()->map().values();
for (Folder *folder : folders) {
_model->slotUpdateFolderState(folder);
}
QString msg;
int cnt = 0;
- const auto &folders = FolderMan::instance()->map().values();
+ const auto folders = FolderMan::instance()->map().values();
for (Folder *folder : folders) {
if (folder->accountState() != _accountState) {
continue;
}
bool ok = false;
- const auto &undecidedList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, &ok);
+ const auto undecidedList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, &ok);
QString p;
for (const auto &it : undecidedList) {
// FIXME: add the folder alias in a hoover hint.
if(!reply.isEmpty()){
auto element = reply.object().value("ocs").toObject().value("data");
- const auto &navLinks = element.toArray();
+ const auto navLinks = element.toArray();
if(navLinks.size() > 0){
for (const QJsonValue &value : navLinks) {
AccountApp* AccountState::findApp(const QString &appId) const
{
if(!appId.isEmpty()) {
- const auto &apps = appList();
+ const auto apps = appList();
const auto it = std::find_if(apps.cbegin(), apps.cend(), [appId](const auto &app) {
return app->id() == appId;
});
void Application::slotCheckConnection()
{
- const auto &list = AccountManager::instance()->accounts();
+ const auto list = AccountManager::instance()->accounts();
for (const auto &accountState : list) {
AccountState::State state = accountState->state();
// This ensures that older clients will not read a configuration
// where two folders for different accounts point at the same
// local folders.
- const auto &folderMap = FolderMan::instance()->map();
+ const auto folderMap = FolderMan::instance()->map();
const auto it = std::find_if(folderMap.cbegin(), folderMap.cend(), [this](const auto *other) {
return other != this && other->cleanPath() == this->cleanPath();
});
QDir dir(_folderConfigPath);
//We need to include hidden files just in case the alias starts with '.'
dir.setFilter(QDir::Files | QDir::Hidden);
- const auto &list = dir.entryList();
+ const auto list = dir.entryList();
// Normally there should be only one account when migrating.
AccountState *accountState = AccountManager::instance()->accounts().value(0).data();
// Migration: The first account that's configured for a local folder shall
// be saved in a backwards-compatible way.
- const auto &folderList = FolderMan::instance()->map();
+ const auto folderList = FolderMan::instance()->map();
const auto it = std::find_if(folderList.cbegin(), folderList.cend(), [this, folder](const auto *other) {
return other != folder && other->cleanPath() == folder->cleanPath();
});
{
QString absolutePath = QDir::cleanPath(path) + QLatin1Char('/');
- const auto &folders = this->map().values();
+ const auto folders = this->map().values();
const auto it = std::find_if(folders.cbegin(), folders.cend(), [absolutePath](const auto *folder) {
const QString folderPath = folder->cleanPath() + QLatin1Char('/');
return absolutePath.startsWith(folderPath, (Utility::isWindows() || Utility::isMac()) ? Qt::CaseInsensitive : Qt::CaseSensitive);