mirror of https://github.com/nextcloud/desktop
port away from QStringList::toSet
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
21464063b6
commit
80b25d36fa
|
@ -193,7 +193,7 @@ void FolderWatcher::changeDetected(const QStringList &paths)
|
|||
// - why do we skip the file altogether instead of e.g. reducing the upload frequency?
|
||||
|
||||
// Check if the same path was reported within the last second.
|
||||
const auto pathsSet = paths.toSet();
|
||||
const auto pathsSet = QSet<QString>{paths.begin(), paths.end()};
|
||||
if (pathsSet == _lastPaths && _timer.elapsed() < 1000) {
|
||||
// the same path was reported within the last second. Skip.
|
||||
return;
|
||||
|
|
|
@ -518,7 +518,8 @@ void SelectiveSyncDialog::accept()
|
|||
{
|
||||
if (_folder) {
|
||||
bool ok = false;
|
||||
auto oldBlackListSet = _folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok).toSet();
|
||||
auto oldBlackList = _folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
|
||||
auto oldBlackListSet = QSet<QString>{oldBlackList.begin(), oldBlackList.end()};
|
||||
if (!ok) {
|
||||
return;
|
||||
}
|
||||
|
@ -532,7 +533,7 @@ void SelectiveSyncDialog::accept()
|
|||
|
||||
//The part that changed should not be read from the DB on next sync because there might be new folders
|
||||
// (the ones that are no longer in the blacklist)
|
||||
auto blackListSet = blackList.toSet();
|
||||
auto blackListSet = QSet<QString>{blackList.begin(), blackList.end()};
|
||||
auto changes = (oldBlackListSet - blackListSet) + (blackListSet - oldBlackListSet);
|
||||
foreach (const auto &it, changes) {
|
||||
_folder->journalDb()->schedulePathForRemoteDiscovery(it);
|
||||
|
|
Loading…
Reference in New Issue