From 3752c3b8722506d9f46cef6db0431cd99d74e8f2 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/ (cherry picked from commit 82434fe87ccf238aa2601c519a59dffb8e5a80b5) --- 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 9d7558daa..21d8dc779 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 451b3dac5..66071974b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -418,6 +418,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 619e0180b..143d4669c 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