diff --git a/.kde-ci.yml b/.kde-ci.yml index 3f564d2ab..ac9c00b4a 100644 --- a/.kde-ci.yml +++ b/.kde-ci.yml @@ -13,6 +13,7 @@ Dependencies: 'frameworks/kitemmodels': '@stable' 'frameworks/kquickcharts': '@stable' 'frameworks/knotifications': '@stable' + 'frameworks/kconfigwidgets': '@stable' 'libraries/kquickimageeditor': '@stable' 'frameworks/sonnet': '@stable' 'libraries/kirigami-addons': '@latest' @@ -25,7 +26,6 @@ Dependencies: 'frameworks/qqc2-desktop-style': '@stable' 'frameworks/kio': '@stable' 'frameworks/kwindowsystem': '@stable' - 'frameworks/kconfigwidgets': '@stable' - 'on': ['Linux/Qt5', 'FreeBSD/Qt5'] 'require': 'frameworks/kdbusaddons': '@stable' diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d7399555..8fae8d6b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,7 +82,7 @@ set_package_properties(Qt${QT_MAJOR_VERSION} PROPERTIES TYPE REQUIRED PURPOSE "Basic application components" ) -find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} COMPONENTS Kirigami2 I18n Notifications Config CoreAddons Sonnet ItemModels) +find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} COMPONENTS Kirigami2 I18n Notifications Config CoreAddons Sonnet ItemModels ConfigWidgets) set_package_properties(KF${QT_MAJOR_VERSION} PROPERTIES TYPE REQUIRED PURPOSE "Basic application components" @@ -105,7 +105,7 @@ if(ANDROID) ) else() find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} COMPONENTS Widgets) - find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS QQC2DesktopStyle ConfigWidgets KIO WindowSystem) + find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS QQC2DesktopStyle KIO WindowSystem) set_package_properties(KF${QT_MAJOR_VERSION}QQC2DesktopStyle PROPERTIES TYPE RUNTIME ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1c1742d98..38afbd0b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -136,6 +136,7 @@ add_library(neochat STATIC mediasizehelper.h eventhandler.cpp enums/delegatetype.h + colorschemer.cpp ) ecm_qt_declare_logging_category(neochat @@ -175,7 +176,6 @@ ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png) target_sources(neochat-app PRIVATE ${NEOCHAT_ICON}) if(NOT ANDROID) - target_sources(neochat PRIVATE colorschemer.cpp colorschemer.h) if (NOT WIN32 AND NOT APPLE) target_sources(neochat PRIVATE trayicon_sni.cpp trayicon_sni.h) if(QT_MAJOR_VERSION STREQUAL "6") @@ -184,8 +184,7 @@ if(NOT ANDROID) else() target_sources(neochat PRIVATE trayicon.cpp trayicon.h) endif() - target_link_libraries(neochat PUBLIC KF${QT_MAJOR_VERSION}::ConfigWidgets KF${QT_MAJOR_VERSION}::WindowSystem) - target_compile_definitions(neochat PUBLIC -DHAVE_COLORSCHEME) + target_link_libraries(neochat PUBLIC KF${QT_MAJOR_VERSION}::WindowSystem) target_compile_definitions(neochat PUBLIC -DHAVE_WINDOWSYSTEM) endif() @@ -199,7 +198,7 @@ else() endif() target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR}) -target_link_libraries(neochat PUBLIC Qt::Core Qt::Quick Qt::Qml Qt::Gui Qt::Multimedia Qt::Network Qt::QuickControls2 KF${QT_MAJOR_VERSION}::I18n KF${QT_MAJOR_VERSION}::Kirigami2 KF${QT_MAJOR_VERSION}::Notifications KF${QT_MAJOR_VERSION}::ConfigCore KF${QT_MAJOR_VERSION}::ConfigGui KF${QT_MAJOR_VERSION}::CoreAddons KF${QT_MAJOR_VERSION}::SonnetCore KF${QT_MAJOR_VERSION}::ItemModels Quotient${QUOTIENT_SUFFIX} cmark::cmark QCoro::Core) +target_link_libraries(neochat PUBLIC Qt::Core Qt::Quick Qt::Qml Qt::Gui Qt::Multimedia Qt::Network Qt::QuickControls2 KF${QT_MAJOR_VERSION}::I18n KF${QT_MAJOR_VERSION}::Kirigami2 KF${QT_MAJOR_VERSION}::Notifications KF${QT_MAJOR_VERSION}::ConfigCore KF${QT_MAJOR_VERSION}::ConfigGui KF${QT_MAJOR_VERSION}::CoreAddons KF${QT_MAJOR_VERSION}::SonnetCore KF${QT_MAJOR_VERSION}::ItemModels KF${QT_MAJOR_VERSION}::ConfigWidgets Quotient${QUOTIENT_SUFFIX} cmark::cmark QCoro::Core) kconfig_add_kcfg_files(neochat GENERATE_MOC neochatconfig.kcfgc) diff --git a/src/main.cpp b/src/main.cpp index 0005d910e..1821d962e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -45,6 +45,7 @@ #include "blurhashimageprovider.h" #include "chatdocumenthandler.h" #include "clipboard.h" +#include "colorschemer.h" #include "controller.h" #include "delegatesizehelper.h" #include "enums/delegatetype.h" @@ -91,9 +92,6 @@ #include "urlhelper.h" #include "windowcontroller.h" -#ifdef HAVE_COLORSCHEME -#include "colorschemer.h" -#endif #include "models/completionmodel.h" #include "models/statemodel.h" @@ -228,13 +226,11 @@ int main(int argc, char *argv[]) Login *login = new Login(); UrlHelper urlHelper; -#ifdef HAVE_COLORSCHEME ColorSchemer colorScheme; qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "ColorSchemer", &colorScheme); if (!config->colorScheme().isEmpty()) { colorScheme.apply(config->colorScheme()); } -#endif qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "Controller", &Controller::instance()); qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "NotificationsManager", &NotificationsManager::instance());