diff --git a/.kde-ci.yml b/.kde-ci.yml index 9f425547b..74a5669f1 100644 --- a/.kde-ci.yml +++ b/.kde-ci.yml @@ -10,6 +10,7 @@ Dependencies: 'frameworks/ki18n': '@latest-kf6' 'frameworks/kconfig': '@latest-kf6' 'frameworks/syntax-highlighting': '@latest-kf6' + 'frameworks/kiconthemes': '@latest-kf6' 'frameworks/kitemmodels': '@latest-kf6' 'frameworks/kquickcharts': '@latest-kf6' 'frameworks/knotifications': '@latest-kf6' diff --git a/CMakeLists.txt b/CMakeLists.txt index c3b64776d..8330e6346 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,7 @@ if (QT_KNOWN_POLICY_QTP0004) qt_policy(SET QTP0004 NEW) endif () -find_package(KF6 ${KF_MIN_VERSION} COMPONENTS Kirigami I18n Notifications Config CoreAddons Sonnet ItemModels ColorScheme) +find_package(KF6 ${KF_MIN_VERSION} COMPONENTS Kirigami I18n Notifications Config CoreAddons Sonnet ItemModels ColorScheme IconThemes) set_package_properties(KF6 PROPERTIES TYPE REQUIRED PURPOSE "Basic application components" diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 5e468305c..2d7cb3484 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -153,6 +153,7 @@ target_include_directories(neochat-app PRIVATE ${CMAKE_BINARY_DIR}) target_link_libraries(neochat-app PRIVATE neochat + KF6::IconThemes ) ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png) diff --git a/src/app/main.cpp b/src/app/main.cpp index 7ff3fab06..6bc61e3f2 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -33,6 +33,7 @@ #include #endif +#include #include #include #include @@ -102,6 +103,10 @@ int main(int argc, char *argv[]) { QNetworkProxyFactory::setUseSystemConfiguration(true); + // We currently need to do this ourselves, + // KirigamiApp currently called this after constructing the app which breaks icons on Windows. + KIconTheme::initTheme(); + #ifdef HAVE_WEBVIEW QtWebView::initialize(); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);