diff --git a/REUSE.toml b/REUSE.toml index 435f12b14..64ea26d71 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -42,13 +42,13 @@ SPDX-FileCopyrightText = "2021 Carl Schwan " SPDX-License-Identifier = "BSD-2-Clause" [[annotations]] -path = "src/neochatconfig.kcfg" +path = "src/app/neochatconfig.kcfg" precedence = "aggregate" SPDX-FileCopyrightText = "2020-2021 Carl Schwan , Tobias Fella " SPDX-License-Identifier = "BSD-2-Clause" [[annotations]] -path = "src/neochat.notifyrc" +path = "src/app/neochat.notifyrc" precedence = "aggregate" SPDX-FileCopyrightText = "2020 Tobias Fella " SPDX-License-Identifier = "BSD-2-Clause" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b98ddbea0..b278acc9e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,4 @@ -# SPDX-FileCopyrightText: 2020-2021 Carl Schwan -# SPDX-FileCopyrightText: 2020-2021 Nicolas Fella -# SPDX-FileCopyrightText: 2020-2021 Tobias Fella +# SPDX-FileCopyrightText: 2025 James Graham # SPDX-License-Identifier: BSD-2-Clause if (NOT ANDROID AND NOT WIN32 AND NOT APPLE AND NOT NEOCHAT_FLATPAK AND NOT NEOCHAT_APPIMAGE) @@ -12,377 +10,7 @@ add_subdirectory(login) add_subdirectory(rooms) add_subdirectory(timeline) add_subdirectory(spaces) +add_subdirectory(chatbar) add_subdirectory(settings) add_subdirectory(devtools) - -add_library(neochat STATIC - controller.cpp - controller.h - roommanager.cpp - roommanager.h - models/userfiltermodel.cpp - models/userfiltermodel.h - models/userdirectorylistmodel.cpp - models/userdirectorylistmodel.h - notificationsmanager.cpp - notificationsmanager.h - blurhash.cpp - blurhash.h - blurhashimageprovider.cpp - blurhashimageprovider.h - windowcontroller.cpp - windowcontroller.h - models/serverlistmodel.cpp - models/serverlistmodel.h - logger.cpp - logger.h - jobs/neochatgetcommonroomsjob.cpp - jobs/neochatgetcommonroomsjob.h - models/notificationsmodel.cpp - models/notificationsmodel.h - proxycontroller.cpp - proxycontroller.h - mediamanager.cpp - mediamanager.h - sharehandler.cpp - sharehandler.h - foreigntypes.h - identityserverhelper.cpp - identityserverhelper.h - models/commonroomsmodel.cpp - models/commonroomsmodel.h -) - -set_source_files_properties(qml/TextToSpeechWrapper.qml PROPERTIES - QT_QML_SINGLETON_TYPE TRUE -) - -set_source_files_properties(qml/OsmLocationPlugin.qml PROPERTIES - QT_QML_SINGLETON_TYPE TRUE -) - -if(ANDROID OR WIN32) - set_source_files_properties(qml/ShareActionStub.qml PROPERTIES - QT_QML_SOURCE_TYPENAME ShareAction - ) -endif() - -ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE - OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat - QML_FILES - qml/Main.qml - qml/AccountMenu.qml - qml/CollapsedRoomDelegate.qml - qml/RoomPage.qml - qml/ExploreRoomsPage.qml - qml/ManualRoomDialog.qml - qml/ExplorerDelegate.qml - qml/InviteUserPage.qml - qml/ImageEditorPage.qml - qml/NeochatMaximizeComponent.qml - qml/TypingPane.qml - qml/QuickSwitcher.qml - qml/HoverActions.qml - qml/AttachmentPane.qml - qml/QuickFormatBar.qml - qml/UserDetailDialog.qml - qml/CreateRoomDialog.qml - qml/OpenFileDialog.qml - qml/KeyVerificationDialog.qml - qml/ConfirmLogoutDialog.qml - qml/VerificationMessage.qml - qml/EmojiItem.qml - qml/EmojiRow.qml - qml/EmojiSas.qml - qml/VerificationCanceled.qml - qml/MessageSourceSheet.qml - qml/RoomSearchPage.qml - qml/RoomPinnedMessagesPage.qml - qml/LocationChooser.qml - qml/InvitationView.qml - qml/AvatarTabButton.qml - qml/OsmLocationPlugin.qml - qml/TextToSpeechWrapper.qml - qml/FullScreenMap.qml - qml/LocationsPage.qml - qml/LocationMapItem.qml - qml/RoomDrawer.qml - qml/RoomDrawerPage.qml - qml/DirectChatDrawerHeader.qml - qml/GroupChatDrawerHeader.qml - qml/RoomInformation.qml - qml/RoomMedia.qml - qml/ChooseRoomDialog.qml - qml/RemoveChildDialog.qml - qml/QrCodeMaximizeComponent.qml - qml/NotificationsView.qml - qml/SearchPage.qml - qml/ServerComboBox.qml - qml/UserSearchPage.qml - qml/ManualUserDialog.qml - qml/RecommendedSpaceDialog.qml - qml/ShareDialog.qml - qml/UnlockSSSSDialog.qml - qml/QrScannerPage.qml - qml/JoinRoomDialog.qml - qml/ConfirmUrlDialog.qml - qml/AccountSwitchDialog.qml - qml/ConfirmLeaveDialog.qml - qml/CodeMaximizeComponent.qml - qml/EditStateDialog.qml - qml/ConsentDialog.qml - qml/AskDirectChatConfirmation.qml - qml/HoverLinkIndicator.qml - qml/AvatarNotification.qml - qml/ReasonDialog.qml - qml/NewPollDialog.qml - DEPENDENCIES - QtCore - QtQuick - IMPORTS - org.kde.neochat.libneochat - org.kde.neochat.rooms - org.kde.neochat.timeline - org.kde.neochat.spaces - org.kde.neochat.settings - org.kde.neochat.devtools - org.kde.neochat.login - org.kde.neochat.chatbar -) - -add_subdirectory(chatbar) - -if(NOT ANDROID AND NOT WIN32) - qt_target_qml_sources(neochat QML_FILES - qml/ShareAction.qml - qml/GlobalMenu.qml - qml/EditMenu.qml - ) -else() - qt_target_qml_sources(neochat QML_FILES qml/ShareActionStub.qml) -endif() - -if(WIN32) - set_target_properties(neochat PROPERTIES OUTPUT_NAME "neochatlib") -endif() - -add_executable(neochat-app - main.cpp -) - -if(TARGET Qt::WebView) - target_link_libraries(neochat-app PUBLIC Qt::WebView) - target_compile_definitions(neochat-app PUBLIC -DHAVE_WEBVIEW) -endif() - -target_include_directories(neochat-app PRIVATE ${CMAKE_BINARY_DIR}) - -target_link_libraries(neochat-app PRIVATE - neochat -) - -ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png) - -target_sources(neochat-app PRIVATE ${NEOCHAT_ICON}) - -if(NOT ANDROID) - if (NOT WIN32 AND NOT APPLE) - target_sources(neochat PRIVATE trayicon_sni.cpp trayicon_sni.h) - target_link_libraries(neochat PRIVATE KF6::StatusNotifierItem) - else() - target_sources(neochat PRIVATE trayicon.cpp trayicon.h) - endif() - target_link_libraries(neochat PUBLIC KF6::WindowSystem) - target_compile_definitions(neochat PUBLIC -DHAVE_WINDOWSYSTEM) -endif() - -if (NOT ANDROID AND NOT WIN32 AND NOT APPLE AND NOT HAIKU) - target_compile_definitions(neochat PUBLIC -DHAVE_RUNNER) - target_compile_definitions(neochat PUBLIC -DHAVE_X11=1) - target_sources(neochat PRIVATE runner.cpp) - - if (TARGET KUnifiedPush) - target_sources(neochat PRIVATE fakerunner.cpp) - endif() -else() - target_compile_definitions(neochat PUBLIC -DHAVE_X11=0) -endif() - -target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models) -target_link_libraries(neochat PRIVATE Settingsplugin Roomsplugin Timelineplugin Spacesplugin Devtoolsplugin Loginplugin chatbarplugin) -target_link_libraries(neochat PUBLIC - LibNeoChat - Timeline - Settings - Qt::Core - Qt::Quick - Qt::Qml - Qt::Gui - Qt::Multimedia - Qt::Network - Qt::QuickControls2 - KF6::I18n - KF6::Kirigami - KF6::Notifications - KF6::ConfigCore - KF6::ConfigGui - KF6::CoreAddons - KF6::SonnetCore - KF6::IconThemes - KF6::ItemModels - QuotientQt6 - Login - Rooms - Spaces -) - -if (TARGET KF6::Crash) - target_link_libraries(neochat PUBLIC KF6::Crash) -endif() - -kconfig_target_kcfg_file(neochat FILE neochatconfig.kcfg CLASS_NAME NeoChatConfig MUTATORS GENERATE_PROPERTIES DEFAULT_VALUE_GETTERS PARENT_IN_CONSTRUCTOR SINGLETON GENERATE_MOC QML_REGISTRATION) - -if(NEOCHAT_FLATPAK) - target_compile_definitions(neochat PUBLIC NEOCHAT_FLATPAK) -endif() - -if(ANDROID) - target_sources(neochat PRIVATE notifyrc.qrc) - target_link_libraries(neochat PRIVATE Qt::Svg OpenSSL::SSL) - if(SQLite3_FOUND) - target_link_libraries(neochat-app PRIVATE SQLite::SQLite3) - endif() - target_sources(neochat-app PRIVATE notifyrc.qrc) - target_link_libraries(neochat PUBLIC Qt::Svg OpenSSL::SSL) - kirigami_package_breeze_icons(ICONS - "arrow-down-symbolic" - "arrow-up-symbolic" - "arrow-up-double-symbolic" - "arrow-left-symbolic" - "arrow-right-symbolic" - "checkmark" - "help-about" - "im-user" - "im-invisible-user" - "im-kick-user" - "mail-attachment" - "dialog-cancel" - "preferences-desktop-emoticons" - "preferences-security" - "document-open" - "document-save" - "document-send" - "dialog-close" - "edit-delete-remove" - "code-context" - "document-edit" - "list-user-add" - "list-add-user" - "user-others" - "media-playback-pause" - "media-playback-start" - "media-playback-stop" - "go-previous" - "go-up" - "go-down" - "list-add" - "irc-join-channel" - "settings-configure" - "configure" - "rating" - "rating-unrated" - "search" - "mail-replied-symbolic" - "edit-clear" - "edit-copy" - "gtk-quit" - "compass" - "computer" - "network-connect" - "list-remove-user" - "org.kde.neochat" - "org.kde.neochat.tray" - "preferences-system-users" - "preferences-desktop-theme-global" - "notifications" - "notifications-disabled" - "audio-volume-high" - "audio-volume-muted" - "draw-highlight" - "zoom-in" - "zoom-out" - "image-rotate-left-symbolic" - "image-rotate-right-symbolic" - "channel-secure-symbolic" - "download" - "smiley" - "tools-check-spelling" - "username-copy" - "system-switch-user" - "bookmark-new" - "bookmark-remove" - "favorite" - "window-new" - "globe" - "visibility" - "home" - "preferences-desktop-notification" - "computer-symbolic" - "gps" - "system-users-symbolic" - "map-flat" - "documentinfo" - "view-list-details" - "go-previous" - "mail-forward-symbolic" - "dialog-warning-symbolic" - "object-rotate-left" - "object-rotate-right" - "add-subtitle" - "security-high" - "security-low" - "security-low-symbolic" - "kde" - "list-remove-symbolic" - "edit-delete" - "user-home-symbolic" - "pin-symbolic" - "kt-restore-defaults-symbolic" - "user-symbolic" - - ${KIRIGAMI_ADDONS_ICONS} - ) - ecm_add_android_apk(neochat-app ANDROID_DIR ${CMAKE_SOURCE_DIR}/android) -else() - target_link_libraries(neochat PUBLIC Qt::Widgets KF6::KIOWidgets) - install(FILES neochat.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR}) -endif() - -if(NOT ANDROID) - set_target_properties(neochat-app PROPERTIES OUTPUT_NAME "neochat") -endif() - -if(TARGET KF6::DBusAddons AND NOT WIN32) - target_link_libraries(neochat PUBLIC KF6::DBusAddons) - target_compile_definitions(neochat PUBLIC -DHAVE_KDBUSADDONS) -endif() - -if (TARGET KF6::KIOWidgets) - target_compile_definitions(neochat PUBLIC -DHAVE_KIO) -endif() - -if (TARGET KUnifiedPush) - target_compile_definitions(neochat PUBLIC -DHAVE_KUNIFIEDPUSH) - target_link_libraries(neochat PUBLIC KUnifiedPush) - - if (NOT ANDROID) - configure_file(org.kde.neochat.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}) - endif() -endif() - -install(TARGETS neochat-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) - -if (NOT ANDROID AND NOT WIN32 AND NOT APPLE) - install(FILES plasma-runner-neochat.desktop DESTINATION ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins) -endif() +add_subdirectory(app) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt new file mode 100644 index 000000000..bd2d75e86 --- /dev/null +++ b/src/app/CMakeLists.txt @@ -0,0 +1,372 @@ +# SPDX-FileCopyrightText: 2020-2021 Carl Schwan +# SPDX-FileCopyrightText: 2020-2021 Nicolas Fella +# SPDX-FileCopyrightText: 2020-2021 Tobias Fella +# SPDX-License-Identifier: BSD-2-Clause + +add_library(neochat STATIC + controller.cpp + controller.h + roommanager.cpp + roommanager.h + models/userfiltermodel.cpp + models/userfiltermodel.h + models/userdirectorylistmodel.cpp + models/userdirectorylistmodel.h + notificationsmanager.cpp + notificationsmanager.h + blurhash.cpp + blurhash.h + blurhashimageprovider.cpp + blurhashimageprovider.h + windowcontroller.cpp + windowcontroller.h + models/serverlistmodel.cpp + models/serverlistmodel.h + logger.cpp + logger.h + models/notificationsmodel.cpp + models/notificationsmodel.h + proxycontroller.cpp + proxycontroller.h + mediamanager.cpp + mediamanager.h + sharehandler.cpp + sharehandler.h + foreigntypes.h + identityserverhelper.cpp + identityserverhelper.h + models/commonroomsmodel.cpp + models/commonroomsmodel.h +) + +set_source_files_properties(qml/TextToSpeechWrapper.qml PROPERTIES + QT_QML_SINGLETON_TYPE TRUE +) + +set_source_files_properties(qml/OsmLocationPlugin.qml PROPERTIES + QT_QML_SINGLETON_TYPE TRUE +) + +if(ANDROID OR WIN32) + set_source_files_properties(qml/ShareActionStub.qml PROPERTIES + QT_QML_SOURCE_TYPENAME ShareAction + ) +endif() + +ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE + OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat + QML_FILES + qml/Main.qml + qml/AccountMenu.qml + qml/CollapsedRoomDelegate.qml + qml/RoomPage.qml + qml/ExploreRoomsPage.qml + qml/ManualRoomDialog.qml + qml/ExplorerDelegate.qml + qml/InviteUserPage.qml + qml/ImageEditorPage.qml + qml/NeochatMaximizeComponent.qml + qml/TypingPane.qml + qml/QuickSwitcher.qml + qml/HoverActions.qml + qml/AttachmentPane.qml + qml/QuickFormatBar.qml + qml/UserDetailDialog.qml + qml/CreateRoomDialog.qml + qml/OpenFileDialog.qml + qml/KeyVerificationDialog.qml + qml/ConfirmLogoutDialog.qml + qml/VerificationMessage.qml + qml/EmojiItem.qml + qml/EmojiRow.qml + qml/EmojiSas.qml + qml/VerificationCanceled.qml + qml/MessageSourceSheet.qml + qml/RoomSearchPage.qml + qml/RoomPinnedMessagesPage.qml + qml/LocationChooser.qml + qml/InvitationView.qml + qml/AvatarTabButton.qml + qml/OsmLocationPlugin.qml + qml/TextToSpeechWrapper.qml + qml/FullScreenMap.qml + qml/LocationsPage.qml + qml/LocationMapItem.qml + qml/RoomDrawer.qml + qml/RoomDrawerPage.qml + qml/DirectChatDrawerHeader.qml + qml/GroupChatDrawerHeader.qml + qml/RoomInformation.qml + qml/RoomMedia.qml + qml/ChooseRoomDialog.qml + qml/RemoveChildDialog.qml + qml/QrCodeMaximizeComponent.qml + qml/NotificationsView.qml + qml/SearchPage.qml + qml/ServerComboBox.qml + qml/UserSearchPage.qml + qml/ManualUserDialog.qml + qml/RecommendedSpaceDialog.qml + qml/ShareDialog.qml + qml/UnlockSSSSDialog.qml + qml/QrScannerPage.qml + qml/JoinRoomDialog.qml + qml/ConfirmUrlDialog.qml + qml/AccountSwitchDialog.qml + qml/ConfirmLeaveDialog.qml + qml/CodeMaximizeComponent.qml + qml/EditStateDialog.qml + qml/ConsentDialog.qml + qml/AskDirectChatConfirmation.qml + qml/HoverLinkIndicator.qml + qml/AvatarNotification.qml + qml/ReasonDialog.qml + qml/NewPollDialog.qml + DEPENDENCIES + QtCore + QtQuick + IMPORTS + org.kde.neochat.libneochat + org.kde.neochat.rooms + org.kde.neochat.timeline + org.kde.neochat.spaces + org.kde.neochat.settings + org.kde.neochat.devtools + org.kde.neochat.login + org.kde.neochat.chatbar +) + +if(NOT ANDROID AND NOT WIN32) + qt_target_qml_sources(neochat QML_FILES + qml/ShareAction.qml + qml/GlobalMenu.qml + qml/EditMenu.qml + ) +else() + qt_target_qml_sources(neochat QML_FILES qml/ShareActionStub.qml) +endif() + +if(WIN32) + set_target_properties(neochat PROPERTIES OUTPUT_NAME "neochatlib") +endif() + +add_executable(neochat-app + main.cpp +) + +if(TARGET Qt::WebView) + target_link_libraries(neochat-app PUBLIC Qt::WebView) + target_compile_definitions(neochat-app PUBLIC -DHAVE_WEBVIEW) +endif() + +target_include_directories(neochat-app PRIVATE ${CMAKE_BINARY_DIR}) + +target_link_libraries(neochat-app PRIVATE + neochat +) + +ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png) + +target_sources(neochat-app PRIVATE ${NEOCHAT_ICON}) + +if(NOT ANDROID) + if (NOT WIN32 AND NOT APPLE) + target_sources(neochat PRIVATE trayicon_sni.cpp trayicon_sni.h) + target_link_libraries(neochat PRIVATE KF6::StatusNotifierItem) + else() + target_sources(neochat PRIVATE trayicon.cpp trayicon.h) + endif() + target_link_libraries(neochat PUBLIC KF6::WindowSystem) + target_compile_definitions(neochat PUBLIC -DHAVE_WINDOWSYSTEM) +endif() + +if (NOT ANDROID AND NOT WIN32 AND NOT APPLE AND NOT HAIKU) + target_compile_definitions(neochat PUBLIC -DHAVE_RUNNER) + target_compile_definitions(neochat PUBLIC -DHAVE_X11=1) + target_sources(neochat PRIVATE runner.cpp) + + if (TARGET KUnifiedPush) + target_sources(neochat PRIVATE fakerunner.cpp) + endif() +else() + target_compile_definitions(neochat PUBLIC -DHAVE_X11=0) +endif() + +target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models) +target_link_libraries(neochat PRIVATE Loginplugin Roomsplugin Timelineplugin Spacesplugin Chatbarplugin Settingsplugin Devtoolsplugin) +target_link_libraries(neochat PUBLIC + LibNeoChat + Timeline + Settings + Qt::Core + Qt::Quick + Qt::Qml + Qt::Gui + Qt::Multimedia + Qt::Network + Qt::QuickControls2 + KF6::I18n + KF6::Kirigami + KF6::Notifications + KF6::ConfigCore + KF6::ConfigGui + KF6::CoreAddons + KF6::SonnetCore + KF6::IconThemes + KF6::ItemModels + QuotientQt6 + Login + Rooms + Spaces +) + +if (TARGET KF6::Crash) + target_link_libraries(neochat PUBLIC KF6::Crash) +endif() + +kconfig_target_kcfg_file(neochat FILE neochatconfig.kcfg CLASS_NAME NeoChatConfig MUTATORS GENERATE_PROPERTIES DEFAULT_VALUE_GETTERS PARENT_IN_CONSTRUCTOR SINGLETON GENERATE_MOC QML_REGISTRATION) + +if(NEOCHAT_FLATPAK) + target_compile_definitions(neochat PUBLIC NEOCHAT_FLATPAK) +endif() + +if(ANDROID) + target_sources(neochat PRIVATE notifyrc.qrc) + target_link_libraries(neochat PRIVATE Qt::Svg OpenSSL::SSL) + if(SQLite3_FOUND) + target_link_libraries(neochat-app PRIVATE SQLite::SQLite3) + endif() + target_sources(neochat-app PRIVATE notifyrc.qrc) + target_link_libraries(neochat PUBLIC Qt::Svg OpenSSL::SSL) + kirigami_package_breeze_icons(ICONS + "arrow-down-symbolic" + "arrow-up-symbolic" + "arrow-up-double-symbolic" + "arrow-left-symbolic" + "arrow-right-symbolic" + "checkmark" + "help-about" + "im-user" + "im-invisible-user" + "im-kick-user" + "mail-attachment" + "dialog-cancel" + "preferences-desktop-emoticons" + "preferences-security" + "document-open" + "document-save" + "document-send" + "dialog-close" + "edit-delete-remove" + "code-context" + "document-edit" + "list-user-add" + "list-add-user" + "user-others" + "media-playback-pause" + "media-playback-start" + "media-playback-stop" + "go-previous" + "go-up" + "go-down" + "list-add" + "irc-join-channel" + "settings-configure" + "configure" + "rating" + "rating-unrated" + "search" + "mail-replied-symbolic" + "edit-clear" + "edit-copy" + "gtk-quit" + "compass" + "computer" + "network-connect" + "list-remove-user" + "org.kde.neochat" + "org.kde.neochat.tray" + "preferences-system-users" + "preferences-desktop-theme-global" + "notifications" + "notifications-disabled" + "audio-volume-high" + "audio-volume-muted" + "draw-highlight" + "zoom-in" + "zoom-out" + "image-rotate-left-symbolic" + "image-rotate-right-symbolic" + "channel-secure-symbolic" + "download" + "smiley" + "tools-check-spelling" + "username-copy" + "system-switch-user" + "bookmark-new" + "bookmark-remove" + "favorite" + "window-new" + "globe" + "visibility" + "home" + "preferences-desktop-notification" + "computer-symbolic" + "gps" + "system-users-symbolic" + "map-flat" + "documentinfo" + "view-list-details" + "go-previous" + "mail-forward-symbolic" + "dialog-warning-symbolic" + "object-rotate-left" + "object-rotate-right" + "add-subtitle" + "security-high" + "security-low" + "security-low-symbolic" + "kde" + "list-remove-symbolic" + "edit-delete" + "user-home-symbolic" + "pin-symbolic" + "kt-restore-defaults-symbolic" + "user-symbolic" + + ${KIRIGAMI_ADDONS_ICONS} + ) + ecm_add_android_apk(neochat-app ANDROID_DIR ${CMAKE_SOURCE_DIR}/android) +else() + target_link_libraries(neochat PUBLIC Qt::Widgets KF6::KIOWidgets) + install(FILES neochat.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR}) +endif() + +if(NOT ANDROID) + set_target_properties(neochat-app PROPERTIES OUTPUT_NAME "neochat") +endif() + +if(TARGET KF6::DBusAddons AND NOT WIN32) + target_link_libraries(neochat PUBLIC KF6::DBusAddons) + target_compile_definitions(neochat PUBLIC -DHAVE_KDBUSADDONS) +endif() + +if (TARGET KF6::KIOWidgets) + target_compile_definitions(neochat PUBLIC -DHAVE_KIO) +endif() + +if (TARGET KUnifiedPush) + target_compile_definitions(neochat PUBLIC -DHAVE_KUNIFIEDPUSH) + target_link_libraries(neochat PUBLIC KUnifiedPush) + + if (NOT ANDROID) + configure_file(org.kde.neochat.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}) + endif() +endif() + +install(TARGETS neochat-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) + +if (NOT ANDROID AND NOT WIN32 AND NOT APPLE) + install(FILES plasma-runner-neochat.desktop DESTINATION ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins) +endif() diff --git a/src/blurhash.cpp b/src/app/blurhash.cpp similarity index 100% rename from src/blurhash.cpp rename to src/app/blurhash.cpp diff --git a/src/blurhash.h b/src/app/blurhash.h similarity index 100% rename from src/blurhash.h rename to src/app/blurhash.h diff --git a/src/blurhashimageprovider.cpp b/src/app/blurhashimageprovider.cpp similarity index 100% rename from src/blurhashimageprovider.cpp rename to src/app/blurhashimageprovider.cpp diff --git a/src/blurhashimageprovider.h b/src/app/blurhashimageprovider.h similarity index 100% rename from src/blurhashimageprovider.h rename to src/app/blurhashimageprovider.h diff --git a/src/controller.cpp b/src/app/controller.cpp similarity index 100% rename from src/controller.cpp rename to src/app/controller.cpp diff --git a/src/controller.h b/src/app/controller.h similarity index 100% rename from src/controller.h rename to src/app/controller.h diff --git a/src/fakerunner.cpp b/src/app/fakerunner.cpp similarity index 100% rename from src/fakerunner.cpp rename to src/app/fakerunner.cpp diff --git a/src/fakerunner.h b/src/app/fakerunner.h similarity index 100% rename from src/fakerunner.h rename to src/app/fakerunner.h diff --git a/src/foreigntypes.h b/src/app/foreigntypes.h similarity index 100% rename from src/foreigntypes.h rename to src/app/foreigntypes.h diff --git a/src/identityserverhelper.cpp b/src/app/identityserverhelper.cpp similarity index 100% rename from src/identityserverhelper.cpp rename to src/app/identityserverhelper.cpp diff --git a/src/identityserverhelper.h b/src/app/identityserverhelper.h similarity index 100% rename from src/identityserverhelper.h rename to src/app/identityserverhelper.h diff --git a/src/logger.cpp b/src/app/logger.cpp similarity index 100% rename from src/logger.cpp rename to src/app/logger.cpp diff --git a/src/logger.h b/src/app/logger.h similarity index 100% rename from src/logger.h rename to src/app/logger.h diff --git a/src/main.cpp b/src/app/main.cpp similarity index 90% rename from src/main.cpp rename to src/app/main.cpp index a0b32216f..bb2beaeee 100644 --- a/src/main.cpp +++ b/src/app/main.cpp @@ -253,32 +253,32 @@ int main(int argc, char *argv[]) #ifdef HAVE_KDBUSADDONS service.connect(&service, - &KDBusService::activateRequested, - &RoomManager::instance(), - [&engine](const QStringList &arguments, const QString &workingDirectory) { - Q_UNUSED(workingDirectory); + &KDBusService::activateRequested, + &RoomManager::instance(), + [&engine](const QStringList &arguments, const QString &workingDirectory) { + Q_UNUSED(workingDirectory); - QWindow *window = windowFromEngine(&engine); - KWindowSystem::updateStartupId(window); + QWindow *window = windowFromEngine(&engine); + KWindowSystem::updateStartupId(window); - WindowController::instance().showAndRaiseWindow(QString()); + WindowController::instance().showAndRaiseWindow(QString()); - // Open matrix uri - if (arguments.isEmpty()) { - return; - } + // Open matrix uri + if (arguments.isEmpty()) { + return; + } - auto args = arguments; - args.removeFirst(); - if (args.length() == 2 && args[0] == "--share"_L1) { - ShareHandler::instance().setText(args[1]); - return; - } + auto args = arguments; + args.removeFirst(); + if (args.length() == 2 && args[0] == "--share"_L1) { + ShareHandler::instance().setText(args[1]); + return; + } - for (const auto &arg : args) { - RoomManager::instance().resolveResource(arg); - } - }); + for (const auto &arg : args) { + RoomManager::instance().resolveResource(arg); + } + }); #endif engine.rootContext()->setContextObject(new KLocalizedContext(&engine)); diff --git a/src/mediamanager.cpp b/src/app/mediamanager.cpp similarity index 100% rename from src/mediamanager.cpp rename to src/app/mediamanager.cpp diff --git a/src/mediamanager.h b/src/app/mediamanager.h similarity index 100% rename from src/mediamanager.h rename to src/app/mediamanager.h diff --git a/src/models/commonroomsmodel.cpp b/src/app/models/commonroomsmodel.cpp similarity index 100% rename from src/models/commonroomsmodel.cpp rename to src/app/models/commonroomsmodel.cpp diff --git a/src/models/commonroomsmodel.h b/src/app/models/commonroomsmodel.h similarity index 100% rename from src/models/commonroomsmodel.h rename to src/app/models/commonroomsmodel.h diff --git a/src/models/notificationsmodel.cpp b/src/app/models/notificationsmodel.cpp similarity index 100% rename from src/models/notificationsmodel.cpp rename to src/app/models/notificationsmodel.cpp diff --git a/src/models/notificationsmodel.h b/src/app/models/notificationsmodel.h similarity index 100% rename from src/models/notificationsmodel.h rename to src/app/models/notificationsmodel.h diff --git a/src/models/serverlistmodel.cpp b/src/app/models/serverlistmodel.cpp similarity index 100% rename from src/models/serverlistmodel.cpp rename to src/app/models/serverlistmodel.cpp diff --git a/src/models/serverlistmodel.h b/src/app/models/serverlistmodel.h similarity index 100% rename from src/models/serverlistmodel.h rename to src/app/models/serverlistmodel.h diff --git a/src/models/userdirectorylistmodel.cpp b/src/app/models/userdirectorylistmodel.cpp similarity index 100% rename from src/models/userdirectorylistmodel.cpp rename to src/app/models/userdirectorylistmodel.cpp diff --git a/src/models/userdirectorylistmodel.h b/src/app/models/userdirectorylistmodel.h similarity index 100% rename from src/models/userdirectorylistmodel.h rename to src/app/models/userdirectorylistmodel.h diff --git a/src/models/userfiltermodel.cpp b/src/app/models/userfiltermodel.cpp similarity index 100% rename from src/models/userfiltermodel.cpp rename to src/app/models/userfiltermodel.cpp diff --git a/src/models/userfiltermodel.h b/src/app/models/userfiltermodel.h similarity index 100% rename from src/models/userfiltermodel.h rename to src/app/models/userfiltermodel.h diff --git a/src/neochat.notifyrc b/src/app/neochat.notifyrc similarity index 100% rename from src/neochat.notifyrc rename to src/app/neochat.notifyrc diff --git a/src/neochatconfig.kcfg b/src/app/neochatconfig.kcfg similarity index 100% rename from src/neochatconfig.kcfg rename to src/app/neochatconfig.kcfg diff --git a/src/notificationsmanager.cpp b/src/app/notificationsmanager.cpp similarity index 99% rename from src/notificationsmanager.cpp rename to src/app/notificationsmanager.cpp index cb293748e..505454ce3 100644 --- a/src/notificationsmanager.cpp +++ b/src/app/notificationsmanager.cpp @@ -317,7 +317,8 @@ void NotificationsManager::doPostInviteNotification(QPointer room) const auto acceptAction = notification->addAction(i18nc("@action:button The thing being accepted is an invitation to chat", "Accept")); const auto rejectAction = notification->addAction(i18nc("@action:button The thing being rejected is an invitation to chat", "Reject")); - const auto rejectAndIgnoreAction = notification->addAction(i18nc("@action:button The thing being rejected is an invitation to chat", "Reject and Ignore User")); + const auto rejectAndIgnoreAction = + notification->addAction(i18nc("@action:button The thing being rejected is an invitation to chat", "Reject and Ignore User")); connect(acceptAction, &KNotificationAction::activated, this, [room, notification]() { if (!room) { return; diff --git a/src/notificationsmanager.h b/src/app/notificationsmanager.h similarity index 100% rename from src/notificationsmanager.h rename to src/app/notificationsmanager.h diff --git a/src/notifyrc.qrc b/src/app/notifyrc.qrc similarity index 100% rename from src/notifyrc.qrc rename to src/app/notifyrc.qrc diff --git a/src/org.kde.neochat.service.in b/src/app/org.kde.neochat.service.in similarity index 100% rename from src/org.kde.neochat.service.in rename to src/app/org.kde.neochat.service.in diff --git a/src/plasma-runner-neochat.desktop b/src/app/plasma-runner-neochat.desktop similarity index 100% rename from src/plasma-runner-neochat.desktop rename to src/app/plasma-runner-neochat.desktop diff --git a/src/proxycontroller.cpp b/src/app/proxycontroller.cpp similarity index 100% rename from src/proxycontroller.cpp rename to src/app/proxycontroller.cpp diff --git a/src/proxycontroller.h b/src/app/proxycontroller.h similarity index 100% rename from src/proxycontroller.h rename to src/app/proxycontroller.h diff --git a/src/qml/AccountMenu.qml b/src/app/qml/AccountMenu.qml similarity index 100% rename from src/qml/AccountMenu.qml rename to src/app/qml/AccountMenu.qml diff --git a/src/qml/AccountSwitchDialog.qml b/src/app/qml/AccountSwitchDialog.qml similarity index 100% rename from src/qml/AccountSwitchDialog.qml rename to src/app/qml/AccountSwitchDialog.qml diff --git a/src/qml/AskDirectChatConfirmation.qml b/src/app/qml/AskDirectChatConfirmation.qml similarity index 100% rename from src/qml/AskDirectChatConfirmation.qml rename to src/app/qml/AskDirectChatConfirmation.qml diff --git a/src/qml/AttachmentPane.qml b/src/app/qml/AttachmentPane.qml similarity index 100% rename from src/qml/AttachmentPane.qml rename to src/app/qml/AttachmentPane.qml diff --git a/src/qml/AvatarNotification.qml b/src/app/qml/AvatarNotification.qml similarity index 100% rename from src/qml/AvatarNotification.qml rename to src/app/qml/AvatarNotification.qml diff --git a/src/qml/AvatarTabButton.qml b/src/app/qml/AvatarTabButton.qml similarity index 100% rename from src/qml/AvatarTabButton.qml rename to src/app/qml/AvatarTabButton.qml diff --git a/src/qml/ChooseRoomDialog.qml b/src/app/qml/ChooseRoomDialog.qml similarity index 100% rename from src/qml/ChooseRoomDialog.qml rename to src/app/qml/ChooseRoomDialog.qml diff --git a/src/qml/CodeMaximizeComponent.qml b/src/app/qml/CodeMaximizeComponent.qml similarity index 100% rename from src/qml/CodeMaximizeComponent.qml rename to src/app/qml/CodeMaximizeComponent.qml diff --git a/src/qml/CollapsedRoomDelegate.qml b/src/app/qml/CollapsedRoomDelegate.qml similarity index 100% rename from src/qml/CollapsedRoomDelegate.qml rename to src/app/qml/CollapsedRoomDelegate.qml diff --git a/src/qml/ConfirmLeaveDialog.qml b/src/app/qml/ConfirmLeaveDialog.qml similarity index 100% rename from src/qml/ConfirmLeaveDialog.qml rename to src/app/qml/ConfirmLeaveDialog.qml diff --git a/src/qml/ConfirmLogoutDialog.qml b/src/app/qml/ConfirmLogoutDialog.qml similarity index 100% rename from src/qml/ConfirmLogoutDialog.qml rename to src/app/qml/ConfirmLogoutDialog.qml diff --git a/src/qml/ConfirmUrlDialog.qml b/src/app/qml/ConfirmUrlDialog.qml similarity index 100% rename from src/qml/ConfirmUrlDialog.qml rename to src/app/qml/ConfirmUrlDialog.qml diff --git a/src/qml/ConsentDialog.qml b/src/app/qml/ConsentDialog.qml similarity index 100% rename from src/qml/ConsentDialog.qml rename to src/app/qml/ConsentDialog.qml diff --git a/src/qml/CreateRoomDialog.qml b/src/app/qml/CreateRoomDialog.qml similarity index 100% rename from src/qml/CreateRoomDialog.qml rename to src/app/qml/CreateRoomDialog.qml diff --git a/src/qml/DirectChatDrawerHeader.qml b/src/app/qml/DirectChatDrawerHeader.qml similarity index 100% rename from src/qml/DirectChatDrawerHeader.qml rename to src/app/qml/DirectChatDrawerHeader.qml diff --git a/src/qml/EditMenu.qml b/src/app/qml/EditMenu.qml similarity index 100% rename from src/qml/EditMenu.qml rename to src/app/qml/EditMenu.qml diff --git a/src/qml/EditStateDialog.qml b/src/app/qml/EditStateDialog.qml similarity index 100% rename from src/qml/EditStateDialog.qml rename to src/app/qml/EditStateDialog.qml diff --git a/src/qml/EmojiItem.qml b/src/app/qml/EmojiItem.qml similarity index 100% rename from src/qml/EmojiItem.qml rename to src/app/qml/EmojiItem.qml diff --git a/src/qml/EmojiRow.qml b/src/app/qml/EmojiRow.qml similarity index 100% rename from src/qml/EmojiRow.qml rename to src/app/qml/EmojiRow.qml diff --git a/src/qml/EmojiSas.qml b/src/app/qml/EmojiSas.qml similarity index 100% rename from src/qml/EmojiSas.qml rename to src/app/qml/EmojiSas.qml diff --git a/src/qml/ExploreRoomsPage.qml b/src/app/qml/ExploreRoomsPage.qml similarity index 100% rename from src/qml/ExploreRoomsPage.qml rename to src/app/qml/ExploreRoomsPage.qml diff --git a/src/qml/ExplorerDelegate.qml b/src/app/qml/ExplorerDelegate.qml similarity index 100% rename from src/qml/ExplorerDelegate.qml rename to src/app/qml/ExplorerDelegate.qml diff --git a/src/qml/FullScreenMap.qml b/src/app/qml/FullScreenMap.qml similarity index 100% rename from src/qml/FullScreenMap.qml rename to src/app/qml/FullScreenMap.qml diff --git a/src/qml/GlobalMenu.qml b/src/app/qml/GlobalMenu.qml similarity index 100% rename from src/qml/GlobalMenu.qml rename to src/app/qml/GlobalMenu.qml diff --git a/src/qml/GroupChatDrawerHeader.qml b/src/app/qml/GroupChatDrawerHeader.qml similarity index 100% rename from src/qml/GroupChatDrawerHeader.qml rename to src/app/qml/GroupChatDrawerHeader.qml diff --git a/src/qml/HoverActions.qml b/src/app/qml/HoverActions.qml similarity index 100% rename from src/qml/HoverActions.qml rename to src/app/qml/HoverActions.qml diff --git a/src/qml/HoverLinkIndicator.qml b/src/app/qml/HoverLinkIndicator.qml similarity index 100% rename from src/qml/HoverLinkIndicator.qml rename to src/app/qml/HoverLinkIndicator.qml diff --git a/src/qml/ImageEditorPage.qml b/src/app/qml/ImageEditorPage.qml similarity index 100% rename from src/qml/ImageEditorPage.qml rename to src/app/qml/ImageEditorPage.qml diff --git a/src/qml/InvitationView.qml b/src/app/qml/InvitationView.qml similarity index 100% rename from src/qml/InvitationView.qml rename to src/app/qml/InvitationView.qml diff --git a/src/qml/InviteUserPage.qml b/src/app/qml/InviteUserPage.qml similarity index 100% rename from src/qml/InviteUserPage.qml rename to src/app/qml/InviteUserPage.qml diff --git a/src/qml/JoinRoomDialog.qml b/src/app/qml/JoinRoomDialog.qml similarity index 100% rename from src/qml/JoinRoomDialog.qml rename to src/app/qml/JoinRoomDialog.qml diff --git a/src/qml/KeyVerificationDialog.qml b/src/app/qml/KeyVerificationDialog.qml similarity index 100% rename from src/qml/KeyVerificationDialog.qml rename to src/app/qml/KeyVerificationDialog.qml diff --git a/src/qml/LocationChooser.qml b/src/app/qml/LocationChooser.qml similarity index 100% rename from src/qml/LocationChooser.qml rename to src/app/qml/LocationChooser.qml diff --git a/src/qml/LocationMapItem.qml b/src/app/qml/LocationMapItem.qml similarity index 100% rename from src/qml/LocationMapItem.qml rename to src/app/qml/LocationMapItem.qml diff --git a/src/qml/LocationsPage.qml b/src/app/qml/LocationsPage.qml similarity index 100% rename from src/qml/LocationsPage.qml rename to src/app/qml/LocationsPage.qml diff --git a/src/qml/Main.qml b/src/app/qml/Main.qml similarity index 100% rename from src/qml/Main.qml rename to src/app/qml/Main.qml diff --git a/src/qml/ManualRoomDialog.qml b/src/app/qml/ManualRoomDialog.qml similarity index 100% rename from src/qml/ManualRoomDialog.qml rename to src/app/qml/ManualRoomDialog.qml diff --git a/src/qml/ManualUserDialog.qml b/src/app/qml/ManualUserDialog.qml similarity index 100% rename from src/qml/ManualUserDialog.qml rename to src/app/qml/ManualUserDialog.qml diff --git a/src/qml/MessageSourceSheet.qml b/src/app/qml/MessageSourceSheet.qml similarity index 100% rename from src/qml/MessageSourceSheet.qml rename to src/app/qml/MessageSourceSheet.qml diff --git a/src/qml/NeochatMaximizeComponent.qml b/src/app/qml/NeochatMaximizeComponent.qml similarity index 100% rename from src/qml/NeochatMaximizeComponent.qml rename to src/app/qml/NeochatMaximizeComponent.qml diff --git a/src/qml/NewPollDialog.qml b/src/app/qml/NewPollDialog.qml similarity index 100% rename from src/qml/NewPollDialog.qml rename to src/app/qml/NewPollDialog.qml diff --git a/src/qml/NotificationsView.qml b/src/app/qml/NotificationsView.qml similarity index 100% rename from src/qml/NotificationsView.qml rename to src/app/qml/NotificationsView.qml diff --git a/src/qml/OpenFileDialog.qml b/src/app/qml/OpenFileDialog.qml similarity index 100% rename from src/qml/OpenFileDialog.qml rename to src/app/qml/OpenFileDialog.qml diff --git a/src/qml/OsmLocationPlugin.qml b/src/app/qml/OsmLocationPlugin.qml similarity index 100% rename from src/qml/OsmLocationPlugin.qml rename to src/app/qml/OsmLocationPlugin.qml diff --git a/src/qml/QrCodeMaximizeComponent.qml b/src/app/qml/QrCodeMaximizeComponent.qml similarity index 100% rename from src/qml/QrCodeMaximizeComponent.qml rename to src/app/qml/QrCodeMaximizeComponent.qml diff --git a/src/qml/QrScannerPage.qml b/src/app/qml/QrScannerPage.qml similarity index 100% rename from src/qml/QrScannerPage.qml rename to src/app/qml/QrScannerPage.qml diff --git a/src/qml/QuickFormatBar.qml b/src/app/qml/QuickFormatBar.qml similarity index 100% rename from src/qml/QuickFormatBar.qml rename to src/app/qml/QuickFormatBar.qml diff --git a/src/qml/QuickSwitcher.qml b/src/app/qml/QuickSwitcher.qml similarity index 100% rename from src/qml/QuickSwitcher.qml rename to src/app/qml/QuickSwitcher.qml diff --git a/src/qml/ReasonDialog.qml b/src/app/qml/ReasonDialog.qml similarity index 100% rename from src/qml/ReasonDialog.qml rename to src/app/qml/ReasonDialog.qml diff --git a/src/qml/RecommendedSpaceDialog.qml b/src/app/qml/RecommendedSpaceDialog.qml similarity index 100% rename from src/qml/RecommendedSpaceDialog.qml rename to src/app/qml/RecommendedSpaceDialog.qml diff --git a/src/qml/RemoveChildDialog.qml b/src/app/qml/RemoveChildDialog.qml similarity index 100% rename from src/qml/RemoveChildDialog.qml rename to src/app/qml/RemoveChildDialog.qml diff --git a/src/qml/RoomDrawer.qml b/src/app/qml/RoomDrawer.qml similarity index 100% rename from src/qml/RoomDrawer.qml rename to src/app/qml/RoomDrawer.qml diff --git a/src/qml/RoomDrawerPage.qml b/src/app/qml/RoomDrawerPage.qml similarity index 100% rename from src/qml/RoomDrawerPage.qml rename to src/app/qml/RoomDrawerPage.qml diff --git a/src/qml/RoomInformation.qml b/src/app/qml/RoomInformation.qml similarity index 100% rename from src/qml/RoomInformation.qml rename to src/app/qml/RoomInformation.qml diff --git a/src/qml/RoomMedia.qml b/src/app/qml/RoomMedia.qml similarity index 100% rename from src/qml/RoomMedia.qml rename to src/app/qml/RoomMedia.qml diff --git a/src/qml/RoomPage.qml b/src/app/qml/RoomPage.qml similarity index 100% rename from src/qml/RoomPage.qml rename to src/app/qml/RoomPage.qml diff --git a/src/qml/RoomPinnedMessagesPage.qml b/src/app/qml/RoomPinnedMessagesPage.qml similarity index 100% rename from src/qml/RoomPinnedMessagesPage.qml rename to src/app/qml/RoomPinnedMessagesPage.qml diff --git a/src/qml/RoomSearchPage.qml b/src/app/qml/RoomSearchPage.qml similarity index 100% rename from src/qml/RoomSearchPage.qml rename to src/app/qml/RoomSearchPage.qml diff --git a/src/qml/SearchPage.qml b/src/app/qml/SearchPage.qml similarity index 100% rename from src/qml/SearchPage.qml rename to src/app/qml/SearchPage.qml diff --git a/src/qml/ServerComboBox.qml b/src/app/qml/ServerComboBox.qml similarity index 100% rename from src/qml/ServerComboBox.qml rename to src/app/qml/ServerComboBox.qml diff --git a/src/qml/ShareAction.qml b/src/app/qml/ShareAction.qml similarity index 100% rename from src/qml/ShareAction.qml rename to src/app/qml/ShareAction.qml diff --git a/src/qml/ShareActionStub.qml b/src/app/qml/ShareActionStub.qml similarity index 100% rename from src/qml/ShareActionStub.qml rename to src/app/qml/ShareActionStub.qml diff --git a/src/qml/ShareDialog.qml b/src/app/qml/ShareDialog.qml similarity index 100% rename from src/qml/ShareDialog.qml rename to src/app/qml/ShareDialog.qml diff --git a/src/qml/TextToSpeechWrapper.qml b/src/app/qml/TextToSpeechWrapper.qml similarity index 100% rename from src/qml/TextToSpeechWrapper.qml rename to src/app/qml/TextToSpeechWrapper.qml diff --git a/src/qml/TypingPane.qml b/src/app/qml/TypingPane.qml similarity index 100% rename from src/qml/TypingPane.qml rename to src/app/qml/TypingPane.qml diff --git a/src/qml/UnlockSSSSDialog.qml b/src/app/qml/UnlockSSSSDialog.qml similarity index 100% rename from src/qml/UnlockSSSSDialog.qml rename to src/app/qml/UnlockSSSSDialog.qml diff --git a/src/qml/UserDetailDialog.qml b/src/app/qml/UserDetailDialog.qml similarity index 100% rename from src/qml/UserDetailDialog.qml rename to src/app/qml/UserDetailDialog.qml diff --git a/src/qml/UserSearchPage.qml b/src/app/qml/UserSearchPage.qml similarity index 100% rename from src/qml/UserSearchPage.qml rename to src/app/qml/UserSearchPage.qml diff --git a/src/qml/VerificationCanceled.qml b/src/app/qml/VerificationCanceled.qml similarity index 100% rename from src/qml/VerificationCanceled.qml rename to src/app/qml/VerificationCanceled.qml diff --git a/src/qml/VerificationMessage.qml b/src/app/qml/VerificationMessage.qml similarity index 100% rename from src/qml/VerificationMessage.qml rename to src/app/qml/VerificationMessage.qml diff --git a/src/roommanager.cpp b/src/app/roommanager.cpp similarity index 99% rename from src/roommanager.cpp rename to src/app/roommanager.cpp index bcf4bf2d7..18b04a5f6 100644 --- a/src/roommanager.cpp +++ b/src/app/roommanager.cpp @@ -10,10 +10,10 @@ #include "eventhandler.h" #include "models/actionsmodel.h" #include "models/messagefiltermodel.h" +#include "models/sortfilterroomtreemodel.h" #include "neochatconfig.h" #include "neochatconnection.h" #include "neochatroom.h" -#include "rooms/models/sortfilterroomtreemodel.h" #include "spacehierarchycache.h" #include "urlhelper.h" diff --git a/src/roommanager.h b/src/app/roommanager.h similarity index 100% rename from src/roommanager.h rename to src/app/roommanager.h diff --git a/src/runner.cpp b/src/app/runner.cpp similarity index 100% rename from src/runner.cpp rename to src/app/runner.cpp diff --git a/src/runner.h b/src/app/runner.h similarity index 100% rename from src/runner.h rename to src/app/runner.h diff --git a/src/sharehandler.cpp b/src/app/sharehandler.cpp similarity index 99% rename from src/sharehandler.cpp rename to src/app/sharehandler.cpp index 5c20044f9..43063021a 100644 --- a/src/sharehandler.cpp +++ b/src/app/sharehandler.cpp @@ -5,7 +5,8 @@ ShareHandler::ShareHandler(QObject *parent) : QObject(parent) -{} +{ +} QString ShareHandler::text() const { diff --git a/src/sharehandler.h b/src/app/sharehandler.h similarity index 100% rename from src/sharehandler.h rename to src/app/sharehandler.h diff --git a/src/trayicon.cpp b/src/app/trayicon.cpp similarity index 100% rename from src/trayicon.cpp rename to src/app/trayicon.cpp diff --git a/src/trayicon.h b/src/app/trayicon.h similarity index 100% rename from src/trayicon.h rename to src/app/trayicon.h diff --git a/src/trayicon_sni.cpp b/src/app/trayicon_sni.cpp similarity index 100% rename from src/trayicon_sni.cpp rename to src/app/trayicon_sni.cpp diff --git a/src/trayicon_sni.h b/src/app/trayicon_sni.h similarity index 100% rename from src/trayicon_sni.h rename to src/app/trayicon_sni.h diff --git a/src/windowcontroller.cpp b/src/app/windowcontroller.cpp similarity index 100% rename from src/windowcontroller.cpp rename to src/app/windowcontroller.cpp diff --git a/src/windowcontroller.h b/src/app/windowcontroller.h similarity index 100% rename from src/windowcontroller.h rename to src/app/windowcontroller.h diff --git a/src/chatbar/CMakeLists.txt b/src/chatbar/CMakeLists.txt index 89a65c95d..9adc743a8 100644 --- a/src/chatbar/CMakeLists.txt +++ b/src/chatbar/CMakeLists.txt @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: 2024 Tobias Fella # SPDX-License-Identifier: BSD-2-Clause -qt_add_library(chatbar STATIC) -ecm_add_qml_module(chatbar GENERATE_PLUGIN_SOURCE +qt_add_library(Chatbar STATIC) +ecm_add_qml_module(Chatbar GENERATE_PLUGIN_SOURCE URI org.kde.neochat.chatbar OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat/chatbar QML_FILES diff --git a/src/libneochat/CMakeLists.txt b/src/libneochat/CMakeLists.txt index 6d82337c2..0eee2f6c7 100644 --- a/src/libneochat/CMakeLists.txt +++ b/src/libneochat/CMakeLists.txt @@ -30,6 +30,7 @@ target_sources(LibNeoChat PRIVATE enums/roomsortorder.h events/imagepackevent.cpp events/pollevent.cpp + jobs/neochatgetcommonroomsjob.cpp models/actionsmodel.cpp models/completionmodel.cpp models/completionproxymodel.cpp diff --git a/src/jobs/neochatgetcommonroomsjob.cpp b/src/libneochat/jobs/neochatgetcommonroomsjob.cpp similarity index 100% rename from src/jobs/neochatgetcommonroomsjob.cpp rename to src/libneochat/jobs/neochatgetcommonroomsjob.cpp diff --git a/src/jobs/neochatgetcommonroomsjob.h b/src/libneochat/jobs/neochatgetcommonroomsjob.h similarity index 100% rename from src/jobs/neochatgetcommonroomsjob.h rename to src/libneochat/jobs/neochatgetcommonroomsjob.h