mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-18 11:51:51 +03:00
Clazy: Fix some warnigns
This commit is contained in:
parent
d109d49b49
commit
bd62615aab
5 changed files with 9 additions and 10 deletions
|
@ -684,7 +684,7 @@ void AccountSettings::slotEnableVfsCurrentFolder()
|
||||||
|
|
||||||
// Wipe selective sync blacklist
|
// Wipe selective sync blacklist
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
auto oldBlacklist = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
|
const auto oldBlacklist = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
|
||||||
folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, {});
|
folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, {});
|
||||||
|
|
||||||
// Change the folder vfs mode and load the plugin
|
// Change the folder vfs mode and load the plugin
|
||||||
|
@ -1171,7 +1171,6 @@ void AccountSettings::refreshSelectiveSyncStatus()
|
||||||
|
|
||||||
bool ok = false;
|
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) {
|
for (const auto &it : undecidedList) {
|
||||||
// FIXME: add the folder alias in a hoover hint.
|
// FIXME: add the folder alias in a hoover hint.
|
||||||
// folder->alias() + QLatin1String("/")
|
// folder->alias() + QLatin1String("/")
|
||||||
|
|
|
@ -90,7 +90,7 @@ FolderMan::~FolderMan()
|
||||||
_instance = nullptr;
|
_instance = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
OCC::Folder::Map FolderMan::map()
|
const OCC::Folder::Map &FolderMan::map() const
|
||||||
{
|
{
|
||||||
return _folderMap;
|
return _folderMap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
*/
|
*/
|
||||||
static void backwardMigrationSettingsKeys(QStringList *deleteKeys, QStringList *ignoreKeys);
|
static void backwardMigrationSettingsKeys(QStringList *deleteKeys, QStringList *ignoreKeys);
|
||||||
|
|
||||||
OCC::Folder::Map map();
|
const Folder::Map &map() const;
|
||||||
|
|
||||||
/** Adds a folder for an account, ensures the journal is gone and saves it in the settings.
|
/** Adds a folder for an account, ensures the journal is gone and saves it in the settings.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -828,12 +828,12 @@ void FolderStatusModel::slotUpdateFolderState(Folder *folder)
|
||||||
|
|
||||||
void FolderStatusModel::slotApplySelectiveSync()
|
void FolderStatusModel::slotApplySelectiveSync()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _folders.count(); ++i) {
|
for (const auto &folderInfo : qAsConst(_folders)) {
|
||||||
if (!_folders[i]._fetched) {
|
if (!folderInfo._fetched) {
|
||||||
_folders[i]._folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, QStringList());
|
folderInfo._folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, QStringList());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto folder = _folders.at(i)._folder;
|
const auto folder = folderInfo._folder;
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
auto oldBlackList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
|
auto oldBlackList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
|
||||||
|
@ -841,7 +841,7 @@ void FolderStatusModel::slotApplySelectiveSync()
|
||||||
qCWarning(lcFolderStatus) << "Could not read selective sync list from db.";
|
qCWarning(lcFolderStatus) << "Could not read selective sync list from db.";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
QStringList blackList = createBlackList(_folders.at(i), oldBlackList);
|
QStringList blackList = createBlackList(folderInfo, oldBlackList);
|
||||||
folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, blackList);
|
folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, blackList);
|
||||||
|
|
||||||
auto blackListSet = blackList.toSet();
|
auto blackListSet = blackList.toSet();
|
||||||
|
|
|
@ -21,7 +21,7 @@ QString OCC::FolderMan::unescapeAlias(QString const&){ return QString(); }
|
||||||
QString OCC::FolderMan::escapeAlias(QString const&){ return QString(); }
|
QString OCC::FolderMan::escapeAlias(QString const&){ return QString(); }
|
||||||
void OCC::FolderMan::scheduleFolder(OCC::Folder*){ }
|
void OCC::FolderMan::scheduleFolder(OCC::Folder*){ }
|
||||||
OCC::SocketApi *OCC::FolderMan::socketApi(){ return new SocketApi; }
|
OCC::SocketApi *OCC::FolderMan::socketApi(){ return new SocketApi; }
|
||||||
OCC::Folder::Map OCC::FolderMan::map() { return OCC::Folder::Map(); }
|
const OCC::Folder::Map &OCC::FolderMan::map() const { return OCC::Folder::Map(); }
|
||||||
void OCC::FolderMan::setSyncEnabled(bool) { }
|
void OCC::FolderMan::setSyncEnabled(bool) { }
|
||||||
void OCC::FolderMan::slotSyncOnceFileUnlocks(QString const&) { }
|
void OCC::FolderMan::slotSyncOnceFileUnlocks(QString const&) { }
|
||||||
void OCC::FolderMan::slotScheduleETagJob(QString const&, OCC::RequestEtagJob*){ }
|
void OCC::FolderMan::slotScheduleETagJob(QString const&, OCC::RequestEtagJob*){ }
|
||||||
|
|
Loading…
Reference in a new issue