[Pkg-owncloud-commits] [owncloud-client] 254/498: Settings: fix broken signal/slot connection:
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:55 UTC 2015
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 d1bfc7a6363421b3c0258846c7b7bd5a99339bce
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Tue Jul 7 20:42:25 2015 +0200
Settings: fix broken signal/slot connection:
No such slot OCC::GeneralSettings::slotForceRemoteDiscoveryOnFolders()
(sender name: 'OCC__IgnoreListEditor')
(receiver name: 'OCC__GeneralSettings')
The slot was in another settings page (because the button 'edit ignored files'
was moved.
Move the actual code to IgnoreListEditor where it logically belong.
Add a comment on the why this code is there.
---
src/gui/accountsettings.cpp | 12 ------------
src/gui/accountsettings.h | 1 -
src/gui/generalsettings.cpp | 1 -
src/gui/ignorelisteditor.cpp | 9 +++++++++
4 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index 162abfb..89db940 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -274,18 +274,6 @@ void AccountSettings::slotResetCurrentFolder()
}
}
-void AccountSettings::slotForceRemoteDiscoveryOnFolders()
-{
- FolderMan* folders = FolderMan::instance();
- foreach (Folder* folder, folders->map()) {
- if (folder->accountState() != _accountState) {
- continue;
- }
-
- folder->journalDb()->forceRemoteDiscoveryNextSync();
- }
-}
-
void AccountSettings::slotDoubleClicked( const QModelIndex& indx )
{
if( ! indx.isValid() ) return;
diff --git a/src/gui/accountsettings.h b/src/gui/accountsettings.h
index c5d7a23..b302cb2 100644
--- a/src/gui/accountsettings.h
+++ b/src/gui/accountsettings.h
@@ -80,7 +80,6 @@ protected slots:
void slotFolderWizardRejected();
void slotDeleteAccount();
void refreshSelectiveSyncStatus();
- void slotForceRemoteDiscoveryOnFolders();
void slotCustomContextMenuRequested(const QPoint&);
private:
diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp
index 2d3c533..f9ee0c0 100644
--- a/src/gui/generalsettings.cpp
+++ b/src/gui/generalsettings.cpp
@@ -137,7 +137,6 @@ void GeneralSettings::slotIgnoreFilesEditor()
{
if (_ignoreEditor.isNull()) {
_ignoreEditor = new IgnoreListEditor(this);
- connect(_ignoreEditor, SIGNAL(accepted()), SLOT(slotForceRemoteDiscoveryOnFolders()));
_ignoreEditor->setAttribute( Qt::WA_DeleteOnClose, true );
_ignoreEditor->open();
} else {
diff --git a/src/gui/ignorelisteditor.cpp b/src/gui/ignorelisteditor.cpp
index 537c0f7..23f96b1 100644
--- a/src/gui/ignorelisteditor.cpp
+++ b/src/gui/ignorelisteditor.cpp
@@ -14,6 +14,7 @@
#include "configfile.h"
#include "ignorelisteditor.h"
+#include "folderman.h"
#include "ui_ignorelisteditor.h"
#include <QFile>
@@ -97,6 +98,14 @@ void IgnoreListEditor::slotUpdateLocalIgnoreList()
ignores.write(prepend+patternItem->text().toUtf8()+'\n');
}
}
+
+ // We need to force a remote discovery after a change of the ignore list.
+ // Otherwise we would not download the files/directories that are no longer
+ // ignored (because the remote etag did not change) (issue #3172)
+ foreach (Folder* folder, FolderMan::instance()->map()) {
+ folder->journalDb()->forceRemoteDiscoveryNextSync();
+ }
+
} else {
QMessageBox::warning(this, tr("Could not open file"),
tr("Cannot write changes to '%1'.").arg(ignoreFile));
--
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