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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0" CACHE STRING "Minimum OSX deployment version")
endif()

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED 20)

Expand Down
57 changes: 0 additions & 57 deletions resources.qrc
Original file line number Diff line number Diff line change
@@ -1,64 +1,7 @@
<RCC>
<qresource prefix="/qml">
<file>src/gui/UserStatusMessageView.qml</file>
<file>src/gui/UserStatusSelectorPage.qml</file>
<file>src/gui/EmojiPicker.qml</file>
<file>src/gui/UserStatusSelectorButton.qml</file>
<file>src/gui/UserStatusSetStatusView.qml</file>
<file>src/gui/PredefinedStatusButton.qml</file>
<file>src/gui/ErrorBox.qml</file>
<file>src/gui/filedetails/FileActivityView.qml</file>
<file>src/gui/filedetails/FileDetailsPage.qml</file>
<file>src/gui/filedetails/FileDetailsView.qml</file>
<file>src/gui/filedetails/FileDetailsWindow.qml</file>
<file>src/gui/filedetails/FileTag.qml</file>
<file>src/gui/filedetails/NCInputDateField.qml</file>
<file>src/gui/filedetails/NCInputTextArea.qml</file>
<file>src/gui/filedetails/NCInputTextField.qml</file>
<file>src/gui/filedetails/NCTabButton.qml</file>
<file>src/gui/filedetails/ShareeDelegate.qml</file>
<file>src/gui/filedetails/ShareDelegate.qml</file>
<file>src/gui/filedetails/ShareDetailsPage.qml</file>
<file>src/gui/filedetails/ShareeSearchField.qml</file>
<file>src/gui/filedetails/ShareView.qml</file>
<file>src/gui/tray/MainWindow.qml</file>
<file>src/gui/tray/UserLine.qml</file>
<file>src/gui/tray/HeaderButton.qml</file>
<file>src/gui/tray/SyncStatus.qml</file>
<file>src/gui/tray/ActivityItem.qml</file>
<file>src/gui/tray/AutoSizingMenu.qml</file>
<file>src/gui/tray/ActivityList.qml</file>
<file>src/gui/tray/CurrentAccountHeaderButton.qml</file>
<file>src/gui/tray/TrayWindowHeader.qml</file>
<file>src/gui/tray/UnifiedSearchInputContainer.qml</file>
<file>src/gui/tray/UnifiedSearchResultFetchMoreTrigger.qml</file>
<file>src/gui/tray/UnifiedSearchResultItem.qml</file>
<file>src/gui/tray/UnifiedSearchResultItemSkeleton.qml</file>
<file>src/gui/tray/UnifiedSearchResultItemSkeletonContainer.qml</file>
<file>src/gui/tray/UnifiedSearchResultItemSkeletonGradientRectangle.qml</file>
<file>src/gui/tray/UnifiedSearchResultListItem.qml</file>
<file>src/gui/tray/UnifiedSearchResultNothingFound.qml</file>
<file>src/gui/tray/UnifiedSearchPlaceholderView.qml</file>
<file>src/gui/tray/UnifiedSearchResultSectionItem.qml</file>
<file>src/gui/tray/ActivityItemContextMenu.qml</file>
<file>src/gui/tray/ActivityItemActions.qml</file>
<file>src/gui/tray/ActivityItemContent.qml</file>
<file>src/gui/tray/TalkReplyTextField.qml</file>
<file>src/gui/tray/CallNotificationDialog.qml</file>
<file>src/gui/tray/EditFileLocallyLoadingDialog.qml</file>
<file>src/gui/tray/EncryptionTokenDiscoveryDialog.qml</file>
<file>src/gui/tray/NCBusyIndicator.qml</file>
<file>src/gui/tray/NCIconWithBackgroundImage.qml</file>
<file>src/gui/tray/NCProgressBar.qml</file>
<file>src/gui/tray/EnforcedPlainTextLabel.qml</file>
<file>theme/Style/Style.qml</file>
<file>theme/Style/qmldir</file>
<file>src/gui/tray/ListItemLineAndSubline.qml</file>
<file>src/gui/tray/TrayFoldersMenuButton.qml</file>
<file>src/gui/tray/TrayFolderListItem.qml</file>
<file>src/gui/ResolveConflictsDialog.qml</file>
<file>src/gui/ConflictDelegate.qml</file>
<file>src/gui/ConflictItemFileInfo.qml</file>
<file>src/gui/macOS/ui/FileProviderSettings.qml</file>
<file>src/gui/macOS/ui/FileProviderFileDelegate.qml</file>
</qresource>
Expand Down
2 changes: 2 additions & 0 deletions src/3rdparty/kirigami/wheelhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

#pragma once

#include <QGuiApplication>

Check failure on line 8 in src/3rdparty/kirigami/wheelhandler.h

View workflow job for this annotation

GitHub Actions / build

src/3rdparty/kirigami/wheelhandler.h:8:10 [clang-diagnostic-error]

'QGuiApplication' file not found
#include <QObject>
#include <QPoint>
#include <QQuickItem>
#include <QStyleHints>
#include <QtQml>
#include <qqmlregistration.h>

class QWheelEvent;
class WheelHandler;
Expand All @@ -21,6 +22,7 @@
class KirigamiWheelEvent : public QObject
{
Q_OBJECT
QML_NAMED_ELEMENT(WheelEvent)

/**
* x: real
Expand Down
99 changes: 46 additions & 53 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,40 +183,7 @@ set(client_SRCS
emojimodel.cpp
syncconflictsmodel.h
syncconflictsmodel.cpp
fileactivitylistmodel.h
fileactivitylistmodel.cpp
filedetails/datefieldbackend.h
filedetails/datefieldbackend.cpp
filedetails/filedetails.h
filedetails/filedetails.cpp
filedetails/sharemodel.h
filedetails/sharemodel.cpp
filedetails/shareemodel.h
filedetails/shareemodel.cpp
filedetails/sortedsharemodel.h
filedetails/sortedsharemodel.cpp
tray/svgimageprovider.h
tray/svgimageprovider.cpp
tray/syncstatussummary.h
tray/syncstatussummary.cpp
tray/activitydata.h
tray/activitydata.cpp
tray/activitylistmodel.h
tray/activitylistmodel.cpp
tray/unifiedsearchresult.h
tray/asyncimageresponse.cpp
tray/unifiedsearchresult.cpp
tray/unifiedsearchresultslistmodel.h
tray/trayimageprovider.cpp
tray/unifiedsearchresultslistmodel.cpp
tray/usermodel.h
tray/usermodel.cpp
tray/notificationhandler.h
tray/notificationhandler.cpp
tray/sortedactivitylistmodel.h
tray/sortedactivitylistmodel.cpp
creds/credentialsfactory.h
tray/talkreply.cpp
creds/credentialsfactory.cpp
creds/httpcredentialsgui.h
creds/httpcredentialsgui.cpp
Expand Down Expand Up @@ -534,26 +501,41 @@ endif()

add_library(nextcloudCore STATIC ${final_src})

target_link_libraries(nextcloudCore
PUBLIC
Nextcloud::sync
Qt::Widgets
Qt::Svg
Qt::Network
Qt::Xml
Qt::Qml
Qt::Quick
Qt::QuickControls2
Qt::QuickWidgets
KF6::Archive
)
qt_add_qml_module(nextcloudCore
URI com.nextcloud.desktopclient
IMPORTS
com.nextcloud.desktopclient.tray
com.nextcloud.desktopclient.filedetails
QML_FILES
UserStatusMessageView.qml
UserStatusSelectorPage.qml
EmojiPicker.qml
UserStatusSelectorButton.qml
UserStatusSetStatusView.qml
PredefinedStatusButton.qml
ErrorBox.qml
)

if(KF6GuiAddons_FOUND)
target_link_libraries(nextcloudCore
PUBLIC
KF6::GuiAddons
)
add_definitions(-DHAVE_KGUIADDONS)
target_link_libraries(nextcloudCore PUBLIC
Nextcloud::sync
Qt::Widgets
Qt::Svg
Qt::Network
Qt::Xml
Qt::Qml
Qt::Quick
Qt::QuickControls2
Qt::QuickWidgets
KF6::Archive
)

target_include_directories(nextcloudCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

if(TARGET KF6::GuiAddons)
target_link_libraries(nextcloudCore PUBLIC
KF6::GuiAddons
)
add_definitions(-DHAVE_KGUIADDONS)
endif()

add_subdirectory(socketapi)
Expand Down Expand Up @@ -589,6 +571,9 @@ target_include_directories(nextcloudCore
${CMAKE_CURRENT_SOURCE_DIR}
)

add_subdirectory(tray)
add_subdirectory(filedetails)

if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
if(NOT WIN32)
file(GLOB _icons "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-icon.png")
Expand Down Expand Up @@ -652,7 +637,15 @@ set_target_properties(nextcloud PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
)

target_link_libraries(nextcloud PRIVATE nextcloudCore)
set_target_properties(nextcloud PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(nextcloud PRIVATE
nextcloudTray
nextcloudTrayplugin
nextcloudFileDetails
nextcloudFileDetailsplugin
nextcloudCore
nextcloudCoreplugin
)

if(TARGET PkgConfig::CLOUDPROVIDERS)
message("Building with libcloudproviderssupport")
Expand Down
3 changes: 3 additions & 0 deletions src/gui/accountstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,3 +698,6 @@ QUrl AccountApp::iconUrl() const
/*-------------------------------------------------------------------------------------*/

} // namespace OCC

Q_DECLARE_METATYPE(OCC::AccountState *)
Q_DECLARE_METATYPE(OCC::AccountStatePtr)
3 changes: 0 additions & 3 deletions src/gui/accountstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,4 @@ class AccountApp : public QObject

}

Q_DECLARE_METATYPE(OCC::AccountState *)
Q_DECLARE_METATYPE(OCC::AccountStatePtr)

#endif //ACCOUNTINFO_H
2 changes: 2 additions & 0 deletions src/gui/callstatechecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

#pragma once

#include <QObject>

Check failure on line 8 in src/gui/callstatechecker.h

View workflow job for this annotation

GitHub Actions / build

src/gui/callstatechecker.h:8:10 [clang-diagnostic-error]

'QObject' file not found
#include <QTimer>
#include <qqmlregistration.h>

#include "networkjobs.h"
#include "accountstate.h"
Expand All @@ -16,6 +17,7 @@
class CallStateChecker : public QObject
{
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(QString token READ token WRITE setToken NOTIFY tokenChanged)
Q_PROPERTY(AccountState* accountState READ accountState WRITE setAccountState NOTIFY accountStateChanged)
Q_PROPERTY(bool checking READ checking WRITE setChecking NOTIFY checkingChanged)
Expand Down
1 change: 1 addition & 0 deletions src/gui/emojimodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

#include <QObject>

Check failure on line 8 in src/gui/emojimodel.h

View workflow job for this annotation

GitHub Actions / build

src/gui/emojimodel.h:8:10 [clang-diagnostic-error]

'QObject' file not found
#include <QSettings>
#include <QObject>
#include <QQmlEngine>
Expand Down Expand Up @@ -75,6 +75,7 @@
class EmojiModel : public QObject
{
Q_OBJECT
QML_ELEMENT

Q_PROPERTY(QVariantList model READ model NOTIFY modelChanged)
Q_PROPERTY(QAbstractListModel *emojiCategoriesModel READ emojiCategoriesModel CONSTANT)
Expand Down
37 changes: 37 additions & 0 deletions src/gui/filedetails/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH
# SPDX-FileContributor: Carl Schwan <[email protected]>
# SPDX-License-Identifier: BSD-3-Clause

add_library(nextcloudFileDetails STATIC)

qt_add_qml_module(nextcloudFileDetails
URI com.nextcloud.desktopclient.filedetails
QML_FILES
FileActivityView.qml
FileDetailsPage.qml
FileDetailsView.qml
FileDetailsWindow.qml
FileTag.qml
NCInputDateField.qml
NCInputTextArea.qml
NCInputTextField.qml
NCTabButton.qml
ShareeDelegate.qml
ShareDelegate.qml
ShareDetailsPage.qml
ShareeSearchField.qml
ShareView.qml
SOURCES
datefieldbackend.h
datefieldbackend.cpp
filedetails.h
filedetails.cpp
sharemodel.h
sharemodel.cpp
shareemodel.h
shareemodel.cpp
sortedsharemodel.h
sortedsharemodel.cpp
)

target_link_libraries(nextcloudFileDetails PRIVATE nextcloudCore)
2 changes: 2 additions & 0 deletions src/gui/filedetails/datefieldbackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

#pragma once

#include <QDate>

Check failure on line 8 in src/gui/filedetails/datefieldbackend.h

View workflow job for this annotation

GitHub Actions / build

src/gui/filedetails/datefieldbackend.h:8:10 [clang-diagnostic-error]

'QDate' file not found
#include <QObject>
#include <qqmlregistration.h>

class TestDateFieldBackend;

Expand All @@ -18,6 +19,7 @@
class DateFieldBackend : public QObject
{
Q_OBJECT
QML_ELEMENT

Q_PROPERTY(QDate date READ date WRITE setDate NOTIFY dateChanged)
Q_PROPERTY(qint64 dateMsecs READ dateMsecs WRITE setDateMsecs NOTIFY dateMsecsChanged)
Expand Down
2 changes: 2 additions & 0 deletions src/gui/filedetails/filedetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@

#pragma once

#include <QFileInfo>

Check failure on line 8 in src/gui/filedetails/filedetails.h

View workflow job for this annotation

GitHub Actions / build

src/gui/filedetails/filedetails.h:8:10 [clang-diagnostic-error]

'QFileInfo' file not found
#include <QFileSystemWatcher>
#include <QLocale>
#include <QTimer>
#include <qqmlregistration.h>

#include "common/syncjournalfilerecord.h"

Expand All @@ -21,6 +22,7 @@
class FileDetails : public QObject
{
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(QString localPath READ localPath WRITE setLocalPath NOTIFY localPathChanged)
Q_PROPERTY(QString name READ name NOTIFY fileChanged)
Q_PROPERTY(QString sizeString READ sizeString NOTIFY fileChanged)
Expand Down
2 changes: 2 additions & 0 deletions src/gui/filedetails/shareemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

#pragma once

#include <QAbstractListModel>

Check failure on line 8 in src/gui/filedetails/shareemodel.h

View workflow job for this annotation

GitHub Actions / build

src/gui/filedetails/shareemodel.h:8:10 [clang-diagnostic-error]

'QAbstractListModel' file not found
#include <QTimer>
#include <qqmlregistration.h>

#include "accountstate.h"
#include "sharee.h"
Expand All @@ -19,6 +20,7 @@
class ShareeModel : public QAbstractListModel
{
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(AccountState* accountState READ accountState WRITE setAccountState NOTIFY accountStateChanged)
Q_PROPERTY(bool shareItemIsFolder READ shareItemIsFolder WRITE setShareItemIsFolder NOTIFY shareItemIsFolderChanged)
Q_PROPERTY(QString searchString READ searchString WRITE setSearchString NOTIFY searchStringChanged)
Expand Down
2 changes: 2 additions & 0 deletions src/gui/filedetails/sharemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

#pragma once

#include <QAbstractListModel>

Check failure on line 8 in src/gui/filedetails/sharemodel.h

View workflow job for this annotation

GitHub Actions / build

src/gui/filedetails/sharemodel.h:8:10 [clang-diagnostic-error]

'QAbstractListModel' file not found
#include <qqmlregistration.h>

#include "accountstate.h"
#include "folder.h"
Expand All @@ -17,6 +18,7 @@
class ShareModel : public QAbstractListModel
{
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(AccountState* accountState READ accountState WRITE setAccountState NOTIFY accountStateChanged)
Q_PROPERTY(QString localPath READ localPath WRITE setLocalPath NOTIFY localPathChanged)
Q_PROPERTY(bool accountConnected READ accountConnected NOTIFY accountConnectedChanged)
Expand Down
2 changes: 2 additions & 0 deletions src/gui/filedetails/sortedsharemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@

#pragma once

#include <QSortFilterProxyModel>

Check failure on line 8 in src/gui/filedetails/sortedsharemodel.h

View workflow job for this annotation

GitHub Actions / build

src/gui/filedetails/sortedsharemodel.h:8:10 [clang-diagnostic-error]

'QSortFilterProxyModel' file not found
#include <qqmlregistration.h>
#include "sharemodel.h"

namespace OCC {

class SortedShareModel : public QSortFilterProxyModel
{
Q_OBJECT
QML_ELEMENT

public:
explicit SortedShareModel(QObject *parent = nullptr);
Expand Down
12 changes: 12 additions & 0 deletions src/gui/macOS/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH
# SPDX-FileContributor: Carl Schwan <[email protected]>
# SPDX-License-Identifier: BSD-3-Clause

add_library(nextcloudMacOS STATIC)

qt_add_qml_module(nextcloudMacOS
URI com.nextcloud.desktopclient.nextcloud.macos
QML_FILES
ui/FileProviderSettings.qml
ui/FileProviderFileDelegate.qml
)
Loading
Loading