Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ if(BUILD_CLIENT)
endif()
endif()

if (LINUX)
find_package(KF6DBusAddons)
endif()

option(BUILD_WITH_WEBENGINE "BUILD_WITH_WEBENGINE" ON)
if (BUILD_WITH_WEBENGINE)
find_package(Qt${QT_VERSION_MAJOR}WebEngineCore ${REQUIRED_QT_VERSION} CONFIG QUIET)
Expand Down
2 changes: 1 addition & 1 deletion NEXTCLOUD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ endif()
set( APPLICATION_ICON_SET "SVG" )
set( APPLICATION_SERVER_URL "" CACHE STRING "URL for the server to use. If entered, the UI field will be pre-filled with it" )
set( APPLICATION_SERVER_URL_ENFORCE ON ) # If set and APPLICATION_SERVER_URL is defined, the server can only connect to the pre-defined URL
set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" )
set( APPLICATION_REV_DOMAIN "nextcloudgmbh.com" )
set( APPLICATION_VIRTUALFILE_SUFFIX "nextcloud" CACHE STRING "Virtual file suffix (not including the .)")
set( APPLICATION_OCSP_STAPLING_ENABLED OFF )
set( APPLICATION_FORBID_BAD_SSL OFF )
Expand Down
2 changes: 2 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@

#cmakedefine01 NEXTCLOUD_DEV

#cmakedefine01 KF6DBusAddons_FOUND

#cmakedefine WITH_WEBENGINE

#cmakedefine01 CLIENTSIDEENCRYPTION_ENFORCE_USB_TOKEN
Expand Down
8 changes: 8 additions & 0 deletions src/common/vfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: LGPL-2.1-or-later
*/

#include "config.h"

Check failure on line 7 in src/common/vfs.cpp

View workflow job for this annotation

GitHub Actions / build

src/common/vfs.cpp:7:10 [clang-diagnostic-error]

'config.h' file not found
#include "vfs.h"
#include "plugin.h"
#include "version.h"
Expand Down Expand Up @@ -37,6 +37,8 @@
return QStringLiteral("wincfapi");
case XAttr:
return QStringLiteral("xattr");
case DBusApi:
return QStringLiteral("dbusapi");
}
return QStringLiteral("off");
}
Expand All @@ -50,6 +52,8 @@
return WithSuffix;
} else if (str == QLatin1String("wincfapi")) {
return WindowsCfApi;
} else if (str == QLatin1String("dbusapi")) {
return DBusApi;
}
return {};
}
Expand Down Expand Up @@ -195,6 +199,10 @@
return Vfs::WindowsCfApi;
}

if (isVfsPluginAvailable(Vfs::DBusApi)) {
return Vfs::DBusApi;
}

if (isVfsPluginAvailable(Vfs::WithSuffix)) {
return Vfs::WithSuffix;
}
Expand Down
1 change: 1 addition & 0 deletions src/common/vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
#pragma once

#include "ocsynclib.h"

Check failure on line 8 in src/common/vfs.h

View workflow job for this annotation

GitHub Actions / build

src/common/vfs.h:8:10 [clang-diagnostic-error]

'ocsynclib.h' file not found
#include "result.h"
#include "syncfilestatus.h"
#include "pinstate.h"
Expand Down Expand Up @@ -96,6 +96,7 @@
WithSuffix,
WindowsCfApi,
XAttr,
DBusApi,
};
Q_ENUM(Mode)
enum class ConvertToPlaceholderResult {
Expand Down
4 changes: 4 additions & 0 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,10 @@ install(TARGETS nextcloud
BUNDLE DESTINATION "."
)

if(KF6DBusAddons_FOUND)
target_link_libraries(nextcloud PRIVATE KF6::DBusAddons)
endif()

if (WIN32)
install(FILES $<TARGET_PDB_FILE:nextcloud> DESTINATION bin OPTIONAL)
endif()
Expand Down
8 changes: 8 additions & 0 deletions src/gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include <QtGlobal>

Check failure on line 7 in src/gui/main.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/main.cpp:7:10 [clang-diagnostic-error]

'QtGlobal' file not found

#include <cmath>
#include <csignal>
Expand All @@ -23,6 +23,10 @@
#include "updater/updater.h"
#endif

#if defined KF6DBusAddons_FOUND && KF6DBusAddons_FOUND
#include <KDBusService>
#endif

#include <QTimer>
#include <QMessageBox>
#include <QDebug>
Expand Down Expand Up @@ -155,6 +159,10 @@
return 0;
}

#if defined KF6DBusAddons_FOUND && KF6DBusAddons_FOUND
auto dbusService = KDBusService{KDBusService::StartupOption::NoExitOnFailure | KDBusService::StartupOption::Unique};
#endif

// We can't call isSystemTrayAvailable with appmenu-qt5 begause it hides the systemtray
// (issue #4693)
if (qgetenv("QT_QPA_PLATFORMTHEME") != "appmenu-qt5")
Expand Down
2 changes: 2 additions & 0 deletions src/gui/wizard/owncloudadvancedsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include <QDir>

Check failure on line 7 in src/gui/wizard/owncloudadvancedsetuppage.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/wizard/owncloudadvancedsetuppage.cpp:7:10 [clang-diagnostic-error]

'QDir' file not found
#include <QFileDialog>
#include <QUrl>
#include <QTimer>
Expand Down Expand Up @@ -107,6 +107,8 @@
bestAvailableVfsMode() == Vfs::WindowsCfApi
#elif defined(BUILD_FILE_PROVIDER_MODULE)
Mac::FileProvider::fileProviderAvailable()
#elif defined Q_OS_LINUX
bestAvailableVfsMode() == Vfs::DBusApi
#else
false
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/gui/wizard/owncloudwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "account.h"

Check failure on line 7 in src/gui/wizard/owncloudwizard.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/wizard/owncloudwizard.cpp:7:10 [clang-diagnostic-error]

'account.h' file not found
#include "config.h"
#include "configfile.h"
#include "theme.h"
Expand Down Expand Up @@ -476,6 +476,9 @@
case Vfs::WindowsCfApi:
callback(true);
return;
case Vfs::DBusApi:
callback(true);
return;
case Vfs::WithSuffix:
msgBox = new QMessageBox(
QMessageBox::Warning,
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/vfs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# that create directories for the build.
#file(GLOB VIRTUAL_FILE_SYSTEM_PLUGINS RELATIVE ${CMAKE_CURRENT_LIST_DIR} "*")

list(APPEND VIRTUAL_FILE_SYSTEM_PLUGINS "suffix" "cfapi" "xattr")
list(APPEND VIRTUAL_FILE_SYSTEM_PLUGINS "suffix" "cfapi" "xattr" "dbusapi")

message("list of plugins ${VIRTUAL_FILE_SYSTEM_PLUGINS}")

Expand Down
46 changes: 46 additions & 0 deletions src/libsync/vfs/dbusapi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: GPL-2.0-or-later

if (LINUX)
add_library(nextcloudsync_vfs_dbus SHARED
hydrationjob.h
hydrationjob.cpp
vfs_dbusapi.h
vfs_dbusapi.cpp
)

target_link_libraries(nextcloudsync_vfs_dbus PRIVATE
Nextcloud::sync
)

set_target_properties(nextcloudsync_vfs_dbus
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
PREFIX
""
AUTOMOC
TRUE
LIBRARY_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync_vfs_dbus
RUNTIME_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync_vfs_dbus
)

target_include_directories(nextcloudsync_vfs_dbus BEFORE PUBLIC ${CMAKE_CURRENT_BINARY_DIR} INTERFACE ${CMAKE_BINARY_DIR})

set(vfs_installdir "${PLUGINDIR}")

generate_export_header(nextcloudsync_vfs_dbus
BASE_NAME nextcloudsync_vfs_dbus
EXPORT_MACRO_NAME NEXTCLOUD_CFAPI_EXPORT
EXPORT_FILE_NAME cfapiexport.h
)

install(TARGETS nextcloudsync_vfs_dbus
LIBRARY DESTINATION "${vfs_installdir}"
RUNTIME DESTINATION "${vfs_installdir}"
)
endif()
Loading
Loading