Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2014-03-14 16:03:16 +0400
committerOlivier Goffart <ogoffart@woboq.com>2014-03-14 16:32:32 +0400
commitaacc278583a783ad7c4f66bfef8ba9cf247a938f (patch)
tree5880c93a2a3f054416168a77cda63f4bbc39dfd3 /src/owncloudcmd
parent57aa86910cd6b312d71081fa4f63c360a908e7ec (diff)
Refactor the progress
Consider that there might be several files processed at the same time
Diffstat (limited to 'src/owncloudcmd')
-rw-r--r--src/owncloudcmd/owncloudcmd.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/owncloudcmd/owncloudcmd.cpp b/src/owncloudcmd/owncloudcmd.cpp
index bf0841177..98090a70e 100644
--- a/src/owncloudcmd/owncloudcmd.cpp
+++ b/src/owncloudcmd/owncloudcmd.cpp
@@ -37,17 +37,17 @@ class OwncloudCmd : public QObject {
public:
OwncloudCmd() : QObject() { }
public slots:
- void transmissionProgressSlot(Progress::Info pI) {
+ void transmissionProgressSlot(Progress::Kind pI) {
static QElapsedTimer localTimer;
static QElapsedTimer remoteTimer;
- if (pI.kind == Progress::StartLocalUpdate) {
+ if (pI == Progress::StartLocalUpdate) {
localTimer.start();
- } else if (pI.kind == Progress::EndLocalUpdate) {
+ } else if (pI == Progress::EndLocalUpdate) {
// There is also localTimer.nsecsElapsed()
qDebug() << "Local Update took" << localTimer.elapsed() << "msec";
- } else if (pI.kind == Progress::StartRemoteUpdate) {
+ } else if (pI == Progress::StartRemoteUpdate) {
remoteTimer.start();
- } else if (pI.kind == Progress::EndRemoteUpdate) {
+ } else if (pI == Progress::EndRemoteUpdate) {
qDebug() << "Remote Update took" << remoteTimer.elapsed() << "msec";
}
}
@@ -222,7 +222,7 @@ int main(int argc, char **argv) {
SyncJournalDb db(options.source_dir);
CSyncThread csyncthread(_csync_ctx, options.source_dir, QUrl(options.target_url).path(), folder, &db);
QObject::connect(&csyncthread, SIGNAL(finished()), &app, SLOT(quit()));
- QObject::connect(&csyncthread, SIGNAL(transmissionProgress(Progress::Info)), &owncloudCmd, SLOT(transmissionProgressSlot(Progress::Info)));
+ QObject::connect(&csyncthread, SIGNAL(transmissionProgress(Progress::Kind,Progress::Info)), &owncloudCmd, SLOT(transmissionProgressSlot(Progress::Kind)));
csyncthread.startSync();
app.exec();