From e1ab0df3a1149055329f67da543f1e1ccdca3f3c Mon Sep 17 00:00:00 2001 From: Piyush Aggarwal Date: Sat, 19 Jun 2021 11:30:14 +0530 Subject: [PATCH] fix Windows build by triggering KIconLoader when indicator starts --- icons/custom_icons.qrc | 5 +++++ indicator/CMakeLists.txt | 4 +++- indicator/main.cpp | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 icons/custom_icons.qrc diff --git a/icons/custom_icons.qrc b/icons/custom_icons.qrc new file mode 100644 index 000000000..7646b994f --- /dev/null +++ b/icons/custom_icons.qrc @@ -0,0 +1,5 @@ + + + app/sc-apps-kdeconnect.svg + + \ No newline at end of file diff --git a/indicator/CMakeLists.txt b/indicator/CMakeLists.txt index 0686be684..309e65547 100644 --- a/indicator/CMakeLists.txt +++ b/indicator/CMakeLists.txt @@ -7,6 +7,8 @@ ecm_qt_declare_logging_category( DEFAULT_SEVERITY Warning EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (indicator)") + qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) + set(indicator_SRCS main.cpp deviceindicator.cpp @@ -34,7 +36,7 @@ else () list(APPEND indicator_SRCS indicatorhelper.cpp) endif() -add_executable(kdeconnect-indicator ${indicator_SRCS} ${debug_file_SRCS}) +add_executable(kdeconnect-indicator ${indicator_SRCS} ${kdeconnect_custom_icons_SRCS} ${debug_file_SRCS} ) target_link_libraries(kdeconnect-indicator Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::Notifications KF5::DBusAddons KF5::KCMUtils kdeconnectinterfaces kdeconnectcore kdeconnectversion) if (WIN32) diff --git a/indicator/main.cpp b/indicator/main.cpp index a30453eda..326ff6eaa 100644 --- a/indicator/main.cpp +++ b/indicator/main.cpp @@ -40,6 +40,7 @@ int main(int argc, char** argv) i18n("(C) 2016 Aleix Pol Gonzalez")); KAboutData::setApplicationData(about); + about.setProgramLogo(QIcon(QStringLiteral(":/icons/kdeconnect/kdeconnect.svg"))); IndicatorHelper helper; helper.preInit();