fix Windows build by triggering KIconLoader when indicator starts

This commit is contained in:
Piyush Aggarwal 2021-06-19 11:30:14 +05:30
parent 01153c9e4e
commit e1ab0df3a1
3 changed files with 9 additions and 1 deletions

5
icons/custom_icons.qrc Normal file
View file

@ -0,0 +1,5 @@
<RCC version="1.0">
<qresource prefix="/icons/kdeconnect/">
<file alias="kdeconnect.svg">app/sc-apps-kdeconnect.svg</file>
</qresource>
</RCC>

View file

@ -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)

View file

@ -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();