Fix icons not showing up in windows
This is done by linking to Breeze icons.
This commit is contained in:
parent
cba818af91
commit
4414234c5b
@ -56,6 +56,8 @@ ecm_set_disabled_deprecation_versions(
|
||||
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui QuickControls2 Sql Svg Xml Network)
|
||||
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS I18n CoreAddons Kirigami Syndication Config ThreadWeaver ColorScheme)
|
||||
|
||||
find_package(KF6 ${KF_MIN_VERSION} QUIET COMPONENTS BreezeIcons)
|
||||
|
||||
find_package(Taglib REQUIRED)
|
||||
find_package(Qt6Keychain)
|
||||
set_package_properties(Qt6Keychain PROPERTIES
|
||||
|
@ -245,6 +245,13 @@ kconfig_add_kcfg_files(kasts settingsmanager.kcfgc GENERATE_MOC)
|
||||
target_include_directories(kasts PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models ${CMAKE_CURRENT_SOURCE_DIR}/utils ${CMAKE_CURRENT_SOURCE_DIR}/sync)
|
||||
target_link_libraries(kasts PRIVATE Qt::Core Qt::Qml Qt::Quick Qt::QuickControls2 Qt::Sql Qt::Svg Qt::Xml Qt::Network KF6::Kirigami KF6::Syndication KF6::CoreAddons KF6::ConfigGui KF6::I18n Taglib::Taglib ${QTKEYCHAIN_LIBRARIES} KF6::ThreadWeaver KF6::ColorScheme KMediaSession)
|
||||
|
||||
if(TARGET KF6::BreezeIcons)
|
||||
target_link_libraries(kasts PRIVATE
|
||||
KF6::BreezeIcons
|
||||
)
|
||||
target_compile_definitions(kasts PRIVATE WITH_BREEZEICONS_LIB)
|
||||
endif ()
|
||||
|
||||
if(KASTS_FLATPAK)
|
||||
target_compile_definitions(kasts PUBLIC KASTS_FLATPAK)
|
||||
endif()
|
||||
|
@ -28,6 +28,10 @@
|
||||
#include <KLocalizedContext>
|
||||
#include <KLocalizedString>
|
||||
|
||||
#ifdef WITH_BREEZEICONS_LIB
|
||||
#include <BreezeIcons>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
#include "androidlogging.h"
|
||||
#endif
|
||||
@ -75,6 +79,10 @@ int main(int argc, char *argv[])
|
||||
app.setFont(font);
|
||||
#endif
|
||||
|
||||
#ifdef WITH_BREEZEICONS_LIB
|
||||
BreezeIcons::initIcons();
|
||||
#endif
|
||||
|
||||
QIcon::setFallbackSearchPaths(QIcon::fallbackSearchPaths() << QStringLiteral(":custom-icons"));
|
||||
|
||||
QCoreApplication::setOrganizationName(QStringLiteral("KDE"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user