[Pkg-owncloud-commits] [owncloud-client] 78/175: Some more minor cleanups based on the pull request review.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Aug 8 10:36:29 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 dec3bd4a0206156ff1db040cc2a0df787d80b111
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Wed May 20 22:44:12 2015 +0200

    Some more minor cleanups based on the pull request review.
---
 src/libsync/owncloudpropagator.cpp | 2 +-
 src/libsync/propagatedownload.cpp  | 6 +++---
 src/libsync/propagatedownload.h    | 1 -
 src/libsync/propagateupload.cpp    | 7 ++-----
 src/libsync/propagatorjobs.h       | 2 +-
 5 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp
index c782688..ff9beaa 100644
--- a/src/libsync/owncloudpropagator.cpp
+++ b/src/libsync/owncloudpropagator.cpp
@@ -270,7 +270,7 @@ void OwncloudPropagator::start(const SyncFileItemVector& items)
                 checksumType == checkSumSHA1C ) {
             qDebug() << "Client sends and expects transmission checksum type" << checksumType;
         } else {
-            qDebug() << "WARN: Unknown transmission checksum type from config" << checksumType;
+            qWarning() << "Unknown transmission checksum type from config" << checksumType;
         }
     }
 
diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp
index aa30a3a..76fa59c 100644
--- a/src/libsync/propagatedownload.cpp
+++ b/src/libsync/propagatedownload.cpp
@@ -486,9 +486,9 @@ void PropagateDownloadFileQNAM::slotGetFinished()
         return;
     }
 
-    // do whatever is needed to add a checksum to the http upload request.
-    // in any case, the validator will emit signal startUpload to let the flow
-    // continue in slotStartUpload here.
+    // Do checksum validation for the download. If there is no checksum header, the validator
+    // will also emit the validated() signal to continue the flow in slot downloadFinished()
+    // as this is (still) also correct.
     TransmissionChecksumValidator *validator = new TransmissionChecksumValidator(_tmpFile.fileName(), this);
     connect(validator, SIGNAL(validated()), this, SLOT(downloadFinished()));
     connect(validator, SIGNAL(validationFailed(QString)), this, SLOT(slotChecksumFail(QString)));
diff --git a/src/libsync/propagatedownload.h b/src/libsync/propagatedownload.h
index b2cf18c..68a059f 100644
--- a/src/libsync/propagatedownload.h
+++ b/src/libsync/propagatedownload.h
@@ -114,7 +114,6 @@ private slots:
     void slotChecksumFail( const QString& errMsg );
 
 private:
-    // Utility::StopWatch _stopWatch;
     QPointer<GETFileJob> _job;
     QFile _tmpFile;
 };
diff --git a/src/libsync/propagateupload.cpp b/src/libsync/propagateupload.cpp
index f602132..dfbba20 100644
--- a/src/libsync/propagateupload.cpp
+++ b/src/libsync/propagateupload.cpp
@@ -23,7 +23,6 @@
 #include "filesystem.h"
 #include "propagatorjobs.h"
 #include "transmissionchecksumvalidator.h"
-#include "configfile.h"
 
 #include <json.h>
 #include <QNetworkAccessManager>
@@ -226,16 +225,14 @@ void PropagateUploadFileQNAM::slotStartUpload()
     }
     _stopWatch.addLapTime(QLatin1String("Checksum"));
 
-    // Update the mtime and size, it might have changed since discovery.
-    time_t prevModtime = _item._modtime; // the value was set in PropagateUploadFileQNAM::start()
+    time_t prevModtime = _item._modtime; // the _item value was set in PropagateUploadFileQNAM::start()
     // but a potential checksum calculation could have taken some time during which the file could
     // have been changed again, so better check again here.
 
-    // Update the mtime and size, it might have changed since discovery.
     _item._modtime = FileSystem::getModTime(fullFilePath);
     if( prevModtime != _item._modtime ) {
         _propagator->_anotherSyncNeeded = true;
-        done(SyncFileItem::SoftError, tr("Local file changed while calculating the checksum."));
+        done(SyncFileItem::SoftError, tr("Local file changed during syncing. It will be resumed."));
         return;
     }
 
diff --git a/src/libsync/propagatorjobs.h b/src/libsync/propagatorjobs.h
index 463cb07..d1b31d7 100644
--- a/src/libsync/propagatorjobs.h
+++ b/src/libsync/propagatorjobs.h
@@ -35,7 +35,7 @@ static const char checkSumAdlerC[] = "Adler32";
 static const char checkSumAdlerUpperC[] = "ADLER32";
 
 /**
- * Declaration of the other propation jobs
+ * Declaration of the other propagation jobs
  */
 class PropagateLocalRemove : public PropagateItemJob {
     Q_OBJECT

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