[Pkg-owncloud-commits] [owncloud-client] 58/470: Cleanup syncengine after the new option not to ask confirmation when everything is removed

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:24:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit b3d57f3c7c6351eb74abc971f8dee5274679e04b
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Feb 22 16:14:22 2016 +0100

    Cleanup syncengine after the new option not to ask confirmation when everything is removed
    
    Cleanup after pull reuqest  #4389
    
    Do not make the SyncEngine depends on the ConfigFile
---
 src/gui/folder.cpp         | 4 ++++
 src/libsync/syncengine.cpp | 5 +----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index 04e134e..0110394 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -1175,6 +1175,10 @@ void Folder::slotNewBigFolderDiscovered(const QString &newF)
 
 void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction, bool *cancel)
 {
+    ConfigFile cfgFile;
+    if (!cfgFile.promptDeleteFiles())
+        return;
+
     QString msg =
         tr("This sync would remove all the files in the sync folder '%1'.\n"
            "This might be because the folder was silently reconfigured, or that all "
diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp
index 8f4f2c0..ac3b3ea 100644
--- a/src/libsync/syncengine.cpp
+++ b/src/libsync/syncengine.cpp
@@ -23,7 +23,6 @@
 #include "syncfilestatus.h"
 #include "csync_private.h"
 #include "filesystem.h"
-#include "configfile.h"
 
 #ifdef Q_OS_WIN
 #include <windows.h>
@@ -842,9 +841,7 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
         }
     }
 
-    // Check the config file before displaying prompt in case it is disabled.
-    ConfigFile cfgFile;
-    if (!_hasNoneFiles && _hasRemoveFile && cfgFile.promptDeleteFiles()) {
+    if (!_hasNoneFiles && _hasRemoveFile) {
         qDebug() << Q_FUNC_INFO << "All the files are going to be changed, asking the user";
         bool cancel = false;
         emit aboutToRemoveAllFiles(_syncedItems.first()->_direction, &cancel);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list