From 82434fe87ccf238aa2601c519a59dffb8e5a80b5 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sat, 25 Jan 2025 15:14:14 +0800 Subject: [PATCH] fix: no icon under Windows See also: - https://invent.kde.org/frameworks/kiconthemes/-/issues/3 - https://planet.kde.org/christoph-cullmann-2024-05-11-kde-applications-icons/ --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 1 + src/main.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5eb371f59..7b9e96e4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,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 IconThemes ColorScheme) set_package_properties(KF6 PROPERTIES TYPE REQUIRED PURPOSE "Basic application components" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 88de6a196..562b452bd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -423,6 +423,7 @@ target_link_libraries(neochat PUBLIC KF6::ConfigGui KF6::CoreAddons KF6::SonnetCore + KF6::IconThemes KF6::ColorScheme KF6::ItemModels QuotientQt6 diff --git a/src/main.cpp b/src/main.cpp index 8aa0a2dc2..bedf926d8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,7 @@ #include #endif +#include #include #include @@ -101,6 +102,7 @@ Q_DECL_EXPORT #endif int main(int argc, char *argv[]) { + KIconTheme::initTheme(); QNetworkProxyFactory::setUseSystemConfiguration(true); #ifdef HAVE_WEBVIEW