[Pkg-owncloud-commits] [owncloud-client] 374/470: SocketAPI: Code simplifications as asked for in the review.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:25:28 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 7acdf50a2cc4cea9a4e1736aae881d14fe3466be
Author: Klaas Freitag <freitag at owncloud.com>
Date: Thu Apr 21 14:54:13 2016 +0200
SocketAPI: Code simplifications as asked for in the review.
---
src/gui/socketapi.cpp | 10 +---------
src/libsync/syncfilestatustracker.cpp | 4 +---
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp
index bcf2dfa..91887f0 100644
--- a/src/gui/socketapi.cpp
+++ b/src/gui/socketapi.cpp
@@ -293,16 +293,8 @@ void SocketApi::command_RETRIEVE_FILE_STATUS(const QString& argument, QIODevice*
const QString file = QDir::cleanPath(argument).mid(syncFolder->cleanPath().length()+1);
// future: Send more specific states for paused, disconnected etc.
- if( syncFolder->syncPaused() ){
+ if( syncFolder->syncPaused() || !syncFolder->accountState()->isConnected() ) {
statusString = nopString;
- } else if( !syncFolder->accountState()->isConnected() ) {
- if( file.isEmpty() || file == QLatin1String("/") ) {
- // only the root folder
- statusString = nopString;
- } else {
- // all other files and dirs in unconnected sync
- statusString = nopString;
- }
} else {
SyncFileStatus fileStatus = syncFolder->syncEngine().syncFileStatusTracker().fileStatus(file);
diff --git a/src/libsync/syncfilestatustracker.cpp b/src/libsync/syncfilestatustracker.cpp
index a374d4b..ffac9e4 100644
--- a/src/libsync/syncfilestatustracker.cpp
+++ b/src/libsync/syncfilestatustracker.cpp
@@ -102,13 +102,11 @@ SyncFileStatus SyncFileStatusTracker::rootStatus()
status = SyncFileStatus::StatusSync;
} else {
// sync is not running. Check dirty list and _syncProblems
- int errs = 0, warns = 0;
+ int errs = 0;
for (auto it = _syncProblems.begin(); it != _syncProblems.end(); ++it) {
if( it->second == SyncFileStatus::StatusError ) {
errs ++;
break; // stop if an error found at all.
- } if( it->second == SyncFileStatus::StatusWarning ) {
- warns ++;
}
}
if( errs ) {
--
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