[Pkg-owncloud-commits] [owncloud-client] 139/498: Fix compilation after merge of the confirm and the new-ui branch
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:44 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 e9e11d251ff28dcc2ef60ed64342cf47fc357d3e
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Jun 10 16:22:14 2015 +0200
Fix compilation after merge of the confirm and the new-ui branch
---
src/gui/accountsettings.cpp | 5 +++--
src/gui/folder.cpp | 2 --
src/gui/folder.h | 2 --
src/gui/folderman.cpp | 1 -
src/gui/folderstatusmodel.cpp | 6 +++---
src/gui/owncloudsetupwizard.cpp | 7 +++++--
src/libsync/syncjournaldb.cpp | 1 +
7 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index 9ea536c..c99c984 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -188,11 +188,12 @@ void AccountSettings::slotFolderWizardAccepted()
definition.alias = folderWizard->field(QLatin1String("alias")).toString();
definition.localPath = folderWizard->field(QLatin1String("sourceFolder")).toString();
definition.targetPath = folderWizard->property("targetPath").toString();
- definition.selectiveSyncBlackList = folderWizard->property("selectiveSyncBlackList").toStringList();
+ auto selectiveSyncBlackList = folderWizard->property("selectiveSyncBlackList").toStringList();
Folder *f = folderMan->addFolder(_accountState, definition);
- folderMan->setSyncEnabled(true);
if( f ) {
+ f->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, selectiveSyncBlackList);
+ folderMan->setSyncEnabled(true);
folderMan->slotScheduleAllFolders();
emit folderChanged();
}
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index 64d2269..23974cd 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -1026,7 +1026,6 @@ void FolderDefinition::save(QSettings& settings, const FolderDefinition& folder)
settings.beginGroup(folder.alias);
settings.setValue(QLatin1String("localPath"), folder.localPath);
settings.setValue(QLatin1String("targetPath"), folder.targetPath);
- settings.setValue(QLatin1String("blackList"), folder.selectiveSyncBlackList);
settings.setValue(QLatin1String("paused"), folder.paused);
settings.endGroup();
}
@@ -1038,7 +1037,6 @@ bool FolderDefinition::load(QSettings& settings, const QString& alias,
folder->alias = alias;
folder->localPath = settings.value(QLatin1String("localPath")).toString();
folder->targetPath = settings.value(QLatin1String("targetPath")).toString();
- folder->selectiveSyncBlackList = settings.value(QLatin1String("blackList")).toStringList();
folder->paused = settings.value(QLatin1String("paused")).toBool();
settings.endGroup();
return true;
diff --git a/src/gui/folder.h b/src/gui/folder.h
index 98fdf7a..f5a4f62 100644
--- a/src/gui/folder.h
+++ b/src/gui/folder.h
@@ -57,8 +57,6 @@ public:
QString localPath;
/// path on remote
QString targetPath;
- /// Which folders not to sync
- QStringList selectiveSyncBlackList;
/// whether the folder is paused
bool paused;
diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp
index 8ecc1d8..e25d61c 100644
--- a/src/gui/folderman.cpp
+++ b/src/gui/folderman.cpp
@@ -387,7 +387,6 @@ Folder* FolderMan::setupFolderFromOldConfigFile(const QString &file, AccountStat
folderDefinition.alias = alias;
folderDefinition.localPath = path;
folderDefinition.targetPath = targetPath;
- folderDefinition.selectiveSyncBlackList = blackList;
folder = new Folder( accountState, folderDefinition, this );
qDebug() << "Adding folder to Folder Map " << folder;
_folderMap[alias] = folder;
diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp
index 55535f7..24351c9 100644
--- a/src/gui/folderstatusmodel.cpp
+++ b/src/gui/folderstatusmodel.cpp
@@ -417,7 +417,7 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list_)
newInfo._checked = Qt::Unchecked;
} else {
auto *f = _folders.at(parentInfo->_pathIdx.first())._folder;
- foreach(const QString &str , f->selectiveSyncBlackList()) {
+ foreach(const QString &str , f->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList)) {
if (str == path || str == QLatin1String("/")) {
newInfo._checked = Qt::Unchecked;
break;
@@ -507,9 +507,9 @@ void FolderStatusModel::slotApplySelectiveSync()
if (!_folders[i]._fetched) continue;
auto folder = _folders.at(i)._folder;
- auto oldBlackList = folder->selectiveSyncBlackList();
+ auto oldBlackList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList);
QStringList blackList = createBlackList(&_folders[i], oldBlackList);
- folder->setSelectiveSyncBlackList(blackList);
+ folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, blackList);
FolderMan *folderMan = FolderMan::instance();
auto blackListSet = blackList.toSet();
diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp
index 85437cf..ca1019d 100644
--- a/src/gui/owncloudsetupwizard.cpp
+++ b/src/gui/owncloudsetupwizard.cpp
@@ -486,8 +486,11 @@ void OwncloudSetupWizard::slotAssistantFinished( int result )
}
folderDefinition.localPath = localFolder;
folderDefinition.targetPath = _remoteFolder;
- folderDefinition.selectiveSyncBlackList = _ocWizard->selectiveSyncBlacklist();
- folderMan->addFolder(account, folderDefinition);
+ auto f = folderMan->addFolder(account, folderDefinition);
+ if (f) {
+ f->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList,
+ _ocWizard->selectiveSyncBlacklist());
+ }
_ocWizard->appendToConfigurationLog(tr("<font color=\"green\"><b>Local sync folder %1 successfully created!</b></font>").arg(localFolder));
}
}
diff --git a/src/libsync/syncjournaldb.cpp b/src/libsync/syncjournaldb.cpp
index c3a4568..624748c 100644
--- a/src/libsync/syncjournaldb.cpp
+++ b/src/libsync/syncjournaldb.cpp
@@ -1300,6 +1300,7 @@ void SyncJournalDb::setSelectiveSyncList(SyncJournalDb::SelectiveSyncListType ty
SqlQuery insQuery("INSERT INTO selectivesync VALUES (?1, ?2)" , _db);
foreach(const auto &path, list) {
+ insQuery.reset();
insQuery.bindValue(1, path);
insQuery.bindValue(2, int(type));
if (!insQuery.exec()) {
--
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