[Pkg-owncloud-commits] [owncloud-client] 158/219: Activity View: honor error string even if no warning

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:22 UTC 2014


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 8ba08d7e8762b0b6fa3977a2fb0ba499a9ee3191
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Thu Sep 25 15:03:54 2014 +0200

    Activity View: honor error string even if no warning
    
    that allows to specify a more specific user message to be displayed.
---
 src/mirall/owncloudpropagator.cpp | 4 +++-
 src/mirall/protocolwidget.cpp     | 8 +++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index f9e9d36..44af523 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -51,7 +51,9 @@ void PropagateItemJob::done(SyncFileItem::Status status, const QString &errorStr
             _item._errorString += tr("; Restoration Failed: ") + errorString;
         }
     } else {
-        _item._errorString = errorString;
+        if( _item._errorString.isEmpty() ) {
+            _item._errorString = errorString;
+        }
     }
 
     if( _propagator->_abortRequested.fetchAndAddRelaxed(0) ) {
diff --git a/src/mirall/protocolwidget.cpp b/src/mirall/protocolwidget.cpp
index abf25f8..d37098f 100644
--- a/src/mirall/protocolwidget.cpp
+++ b/src/mirall/protocolwidget.cpp
@@ -214,7 +214,13 @@ QTreeWidgetItem* ProtocolWidget::createCompletedTreewidgetItem(const QString& fo
         }
 
     } else {
-        message = Progress::asResultString(item);
+        // if the error string is set, it's prefered because it is a usefull user message.
+        // at least should be...
+        if(item._errorString.isEmpty()) {
+            message = Progress::asResultString(item);
+        } else {
+            message = item._errorString;
+        }
         columns << message;
         if (Progress::isSizeDependent(item._instruction)) {
             columns <<  Utility::octetsToString( item._size );

-- 
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