[Pkg-owncloud-commits] [owncloud-client] 105/470: Move the Logger reference back into src/gui

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:24:50 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 e91a5c85ff7f479aadf7180b6aea9c7dc4c184db
Author: Jocelyn Turcotte <jturcotte at woboq.com>
Date:   Thu Mar 3 20:24:29 2016 +0100

    Move the Logger reference back into src/gui
---
 src/gui/folder.cpp         | 11 +++++++++++
 src/libsync/syncengine.cpp | 12 ------------
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index 4a68c62..4f7a3db 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -46,6 +46,15 @@
 
 namespace OCC {
 
+static void csyncLogCatcher(int /*verbosity*/,
+                        const char */*function*/,
+                        const char *buffer,
+                        void */*userdata*/)
+{
+    Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
+}
+
+
 Folder::Folder(const FolderDefinition& definition,
                QObject* parent)
     : QObject(parent)
@@ -813,6 +822,8 @@ void Folder::startSync(const QStringList &pathList)
     if (proxyDirty()) {
         setProxyDirty(false);
     }
+    csync_set_log_callback( csyncLogCatcher );
+    csync_set_log_level( Logger::instance()->isNoop() ? 0 : 11 );
 
     if (isBusy()) {
         qCritical() << "* ERROR csync is still running and new sync requested.";
diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp
index a5763e0..b4a549e 100644
--- a/src/libsync/syncengine.cpp
+++ b/src/libsync/syncengine.cpp
@@ -15,7 +15,6 @@
 
 #include "syncengine.h"
 #include "account.h"
-#include "logger.h"
 #include "owncloudpropagator.h"
 #include "syncjournaldb.h"
 #include "syncjournalfilerecord.h"
@@ -57,14 +56,6 @@ bool SyncEngine::_syncRunning = false;
 
 qint64 SyncEngine::minimumFileAgeForUpload = 2000;
 
-static void csyncLogCatcher(int /*verbosity*/,
-                        const char */*function*/,
-                        const char *buffer,
-                        void */*userdata*/)
-{
-    Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
-}
-
 SyncEngine::SyncEngine(AccountPtr account, const QString& localPath,
                        const QUrl& remoteURL, const QString& remotePath, OCC::SyncJournalDb* journal)
   : _account(account)
@@ -98,9 +89,6 @@ SyncEngine::SyncEngine(AccountPtr account, const QString& localPath,
 #endif
     url_string = Utility::toCSyncScheme(url_string);
 
-    csync_set_log_callback( csyncLogCatcher );
-    csync_set_log_level( Logger::instance()->isNoop() ? 0 : 11 );
-
     csync_create(&_csync_ctx, localPath.toUtf8().data(), url_string.toUtf8().data());
     csync_init(_csync_ctx);
     _excludedFiles.reset(new ExcludedFiles(&_csync_ctx->excludes));

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