Uses configuraion to determine if it should show empty folder popup.

Configuration default value is set to false because  users are getting
the popup message too often.

Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
Camila San 2019-04-12 12:11:43 +02:00
parent 936bdd04a8
commit 7f3c3f6eb6
No known key found for this signature in database
GPG key ID: 7A4A6121E88E2AD4
2 changed files with 5 additions and 2 deletions

View file

@ -750,7 +750,7 @@ void ConfigFile::setMoveToTrash(bool isChecked)
bool ConfigFile::promptDeleteFiles() const
{
QSettings settings(configFile(), QSettings::IniFormat);
return settings.value(QLatin1String(promptDeleteC), true).toBool();
return settings.value(QLatin1String(promptDeleteC), false).toBool();
}
void ConfigFile::setPromptDeleteFiles(bool promptDeleteFiles)

View file

@ -26,6 +26,8 @@
#include "propagateremotedelete.h"
#include "propagatedownload.h"
#include "common/asserts.h"
#include "configfile.h"
#ifdef Q_OS_WIN
#include <windows.h>
@ -1035,7 +1037,8 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
}
}
if (!_hasNoneFiles && _hasRemoveFile) {
ConfigFile cfgFile;
if (!_hasNoneFiles && _hasRemoveFile && cfgFile.promptDeleteFiles()) {
qCInfo(lcEngine) << "All the files are going to be changed, asking the user";
bool cancel = false;
emit aboutToRemoveAllFiles(syncItems.first()->_direction, &cancel);