[Pkg-owncloud-commits] [owncloud-client] 178/332: Move Folder, FolderMan, and FolderWatcher outside of owncloudsync

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:56 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 45d1567057618736e018a15e27b4930c29f09829
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Jul 7 16:30:32 2014 +0200

    Move Folder, FolderMan, and FolderWatcher outside of owncloudsync
    
    Those class are maintaining the folder for the mirall configuration
    They are not usefull in command line clients
    
    Also the FolderWatcher is only used by the folder and not used by the
    command line clients
---
 src/CMakeLists.txt           | 35 +++++++++++++++++------------------
 src/mirall/folder.h          |  2 +-
 src/mirall/folderman.h       |  2 +-
 src/mirall/folderwatcher.cpp |  1 -
 test/CMakeLists.txt          | 26 ++++++++++++++++++++------
 test/owncloud_add_test.cmake |  7 ++++---
 6 files changed, 43 insertions(+), 30 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 209fba2..74a67fc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -79,9 +79,6 @@ set(3rdparty_INC
     )
 
 set(libsync_SRCS
-    mirall/folderman.cpp
-    mirall/folder.cpp
-    mirall/folderwatcher.cpp
     mirall/syncresult.cpp
     mirall/mirallconfigfile.cpp
     mirall/syncengine.cpp
@@ -129,24 +126,10 @@ else()
     )
 endif()
 
-IF( NOT WIN32 AND NOT APPLE )
-    set(libsync_SRCS ${libsync_SRCS} mirall/folderwatcher_linux.cpp)
-ENDIF()
-IF( WIN32 )
-    set(libsync_SRCS ${libsync_SRCS} mirall/folderwatcher_win.cpp)
-ENDIF()
-IF( APPLE )
-    list(APPEND libsync_SRCS mirall/folderwatcher_mac.cpp)
-ENDIF()
-
-
 # These headers are installed for libowncloudsync to be used by 3rd party apps
 set(owncloudsync_HEADERS
     mirall/account.h
     mirall/syncengine.h
-    mirall/folder.h
-    mirall/folderman.h
-    mirall/folderwatcher.h
     mirall/mirallconfigfile.h
     mirall/networkjobs.h
     mirall/progressdispatcher.h
@@ -272,6 +255,9 @@ qt_wrap_ui(mirall_UI_SRCS ${mirall_UI})
 set(mirall_SRCS
     mirall/application.cpp
     mirall/systray.cpp
+    mirall/folderman.cpp
+    mirall/folder.cpp
+    mirall/folderwatcher.cpp
     mirall/folderwizard.cpp
     mirall/folderstatusmodel.cpp
     mirall/protocolwidget.cpp
@@ -313,6 +299,9 @@ set(mirall_HEADERS
     wizard/owncloudwizardcommon.h
     wizard/owncloudshibbolethcredspage.h
     wizard/owncloudadvancedsetuppage.h
+    mirall/folder.h
+    mirall/folderman.h
+    mirall/folderwatcher.h
     mirall/folderstatusmodel.h
     mirall/sslerrordialog.h
     mirall/logbrowser.h
@@ -339,7 +328,7 @@ set(updater_HEADERS
 )
 
 IF( APPLE )
-    list(APPEND mirall_SRCS mirall/cocoainitializer_mac.mm)
+    list(APPEND mirall_SRCSmirall_SRCS mirall/cocoainitializer_mac.mm)
     list(APPEND mirall_HEADERS mirall/cocoainitializer.h)
 
     list(APPEND mirall_SRCS mirall/settingsdialogmac.cpp)
@@ -353,6 +342,16 @@ IF( APPLE )
    endif()
 ENDIF()
 
+IF( NOT WIN32 AND NOT APPLE )
+set(mirall_SRCS ${mirall_SRCS} mirall/folderwatcher_linux.cpp)
+ENDIF()
+IF( WIN32 )
+set(mirall_SRCS ${mirall_SRCS} mirall/folderwatcher_win.cpp)
+ENDIF()
+IF( APPLE )
+list(APPEND mirall_SRCS mirall/folderwatcher_mac.cpp)
+ENDIF()
+
 # csync is required.
 include_directories(../csync/src ../csync/src/httpbf/src ${CMAKE_CURRENT_BINARY_DIR}/../csync ${CMAKE_CURRENT_BINARY_DIR}/../csync/src )
 include_directories(${3rdparty_INC})
diff --git a/src/mirall/folder.h b/src/mirall/folder.h
index db5fd0b..22f9f68 100644
--- a/src/mirall/folder.h
+++ b/src/mirall/folder.h
@@ -58,7 +58,7 @@ enum SyncFileStatus {
     FILE_STATUS_SHARED
 };
 
-class OWNCLOUDSYNC_EXPORT Folder : public QObject
+class Folder : public QObject
 {
     Q_OBJECT
 
diff --git a/src/mirall/folderman.h b/src/mirall/folderman.h
index 3c51a0e..82f6970 100644
--- a/src/mirall/folderman.h
+++ b/src/mirall/folderman.h
@@ -32,7 +32,7 @@ namespace Mirall {
 
 class Application;
 
-class OWNCLOUDSYNC_EXPORT FolderMan : public QObject
+class FolderMan : public QObject
 {
     Q_OBJECT
 public:
diff --git a/src/mirall/folderwatcher.cpp b/src/mirall/folderwatcher.cpp
index ae119ca..7813a1e 100644
--- a/src/mirall/folderwatcher.cpp
+++ b/src/mirall/folderwatcher.cpp
@@ -13,7 +13,6 @@
 
 // event masks
 #include "mirall/folderwatcher.h"
-#include "mirall/folder.h"
 
 #include <stdint.h>
 
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 3521be1..37ac1e8 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -4,13 +4,27 @@ include_directories(${CMAKE_SOURCE_DIR}/csync/src/std)
 
 include(owncloud_add_test.cmake)
 
-owncloud_add_test(OwncloudPropagator)
-owncloud_add_test(Utility)
-owncloud_add_test(Updater)
-owncloud_add_test(FolderWatcher)
-owncloud_add_test(CSyncSqlite)
+owncloud_add_test(OwncloudPropagator "")
+owncloud_add_test(Utility "")
+owncloud_add_test(Updater "")
 
+SET(FolderWatcher_SRC ../src/mirall/folderwatcher.cpp)
+
+IF( NOT WIN32 AND NOT APPLE )
+list(APPEND FolderWatcher_SRC  ../src/mirall/folderwatcher_linux.cpp)
+ENDIF()
+IF( WIN32 )
+list(APPEND  FolderWatcher_SRC ../src/mirall/folderwatcher_win.cpp)
+ENDIF()
+IF( APPLE )
+list(APPEND FolderWatcher_SRC ../src/mirall/folderwatcher_mac.cpp)
+ENDIF()
+
+owncloud_add_test(FolderWatcher "${FolderWatcher_SRC}")
 if( UNIX AND NOT APPLE )
-	owncloud_add_test(InotifyWatcher)
+    owncloud_add_test(InotifyWatcher "${FolderWatcher_SRC}")
 endif(UNIX AND NOT APPLE)
 
+owncloud_add_test(CSyncSqlite "")
+
+
diff --git a/test/owncloud_add_test.cmake b/test/owncloud_add_test.cmake
index a7bf265..523819b 100644
--- a/test/owncloud_add_test.cmake
+++ b/test/owncloud_add_test.cmake
@@ -1,13 +1,14 @@
-macro(owncloud_add_test test_class)
+macro(owncloud_add_test test_class additional_cpp)
     include_directories(${QT_INCLUDES} "${PROJECT_SOURCE_DIR}/src" ${CMAKE_CURRENT_BINARY_DIR})
 
     set(OWNCLOUD_TEST_CLASS ${test_class})
+    set(CMAKE_AUTOMOC TRUE)
     string(TOLOWER "${OWNCLOUD_TEST_CLASS}" OWNCLOUD_TEST_CLASS_LOWERCASE)
     configure_file(main.cpp.in test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp)
     configure_file(test${OWNCLOUD_TEST_CLASS_LOWERCASE}.h test${OWNCLOUD_TEST_CLASS_LOWERCASE}.h)
-    qt_wrap_cpp(${OWNCLOUD_TEST_CLASS}_MOCS test${OWNCLOUD_TEST_CLASS_LOWERCASE}.h)
+    qt_wrap_cpp(test${OWNCLOUD_TEST_CLASS_LOWERCASE}.h)
 
-    add_executable(${OWNCLOUD_TEST_CLASS}Test test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp ${${OWNCLOUD_TEST_CLASS}_MOCS})
+    add_executable(${OWNCLOUD_TEST_CLASS}Test test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp ${additional_cpp})
     qt5_use_modules(${OWNCLOUD_TEST_CLASS}Test Test Sql Xml)
 
     target_link_libraries(${OWNCLOUD_TEST_CLASS}Test

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