зеркало из https://github.com/nextcloud/desktop.git
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
This commit is contained in:
Родитель
8aacb3f7ec
Коммит
45d1567057
|
@ -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})
|
||||
|
|
|
@ -58,7 +58,7 @@ enum SyncFileStatus {
|
|||
FILE_STATUS_SHARED
|
||||
};
|
||||
|
||||
class OWNCLOUDSYNC_EXPORT Folder : public QObject
|
||||
class Folder : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Mirall {
|
|||
|
||||
class Application;
|
||||
|
||||
class OWNCLOUDSYNC_EXPORT FolderMan : public QObject
|
||||
class FolderMan : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
// event masks
|
||||
#include "mirall/folderwatcher.h"
|
||||
#include "mirall/folder.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
|
@ -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 "")
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче