[Pkg-owncloud-commits] [owncloud-client] 241/332: SocketAPI: Connect REGISTER_FOLDER to Foldermans events.

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:06 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 98e21ae0ad2939088bd91d79f5b6dfcf1613389c
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Fri Jul 25 12:20:38 2014 +0200

    SocketAPI: Connect REGISTER_FOLDER to Foldermans events.
---
 src/mirall/folderman.cpp | 9 +++++++++
 src/mirall/socketapi.h   | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/mirall/folderman.cpp b/src/mirall/folderman.cpp
index 3cbaa83..5729c4d 100644
--- a/src/mirall/folderman.cpp
+++ b/src/mirall/folderman.cpp
@@ -82,6 +82,10 @@ void FolderMan::unloadFolder( const QString& alias )
         f = _folderMap[alias];
     }
     if( f ) {
+        if( _socketApi ) {
+            _socketApi->slotUnregisterPath(alias);
+        }
+
         _folderChangeSignalMapper->removeMappings(f);
         if( _folderWatchers.contains(alias)) {
             FolderWatcher *fw = _folderWatchers[alias];
@@ -131,6 +135,11 @@ void FolderMan::registerFolderMonitor( Folder *folder )
         _folderWatcherSignalMapper->setMapping(fw, folder->alias());
         _folderWatchers.insert(folder->alias(), fw);
     }
+
+    // register the folder with the socket API
+    if( _socketApi ) {
+        _socketApi->slotRegisterPath(folder->alias());
+    }
 }
 
 void FolderMan::addMonitorPath( const QString& alias, const QString& path )
diff --git a/src/mirall/socketapi.h b/src/mirall/socketapi.h
index a365d1b..cd8cbdf 100644
--- a/src/mirall/socketapi.h
+++ b/src/mirall/socketapi.h
@@ -38,14 +38,14 @@ public:
 
 public slots:
     void slotUpdateFolderView(const QString&);
+    void slotUnregisterPath( const QString& alias );
+    void slotRegisterPath( const QString& alias );
 
 private slots:
     void slotNewConnection();
     void onLostConnection();
     void slotReadSocket();
     void slotJobCompleted(const QString &, const SyncFileItem &);
-    void slotUnregisterPath( const QString& alias );
-    void slotRegisterPath( const QString& alias );
 
 private:
     void sendMessage(QTcpSocket* socket, const QString& message);

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