diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 06c369907..7b1376f16 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,6 +1,12 @@ qt5_add_resources(kdeconnect_SRCS resources.qrc) -add_executable(kdeconnect-app main.cpp ${kdeconnect_SRCS}) +qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) + +add_executable(kdeconnect-app + main.cpp + ${kdeconnect_SRCS} + ${kdeconnect_custom_icons_SRCS} +) target_link_libraries(kdeconnect-app Qt5::Quick Qt5::QuickControls2 Qt5::Widgets KF5::CoreAddons KF5::I18n) install(TARGETS kdeconnect-app ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index 3f71e4c9a..3fedd29b3 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -13,42 +13,3 @@ if(APPLE) endif() ecm_install_icons(ICONS ${APP_ICONS} DESTINATION ${ICON_INSTALL_DIR}) - -ecm_install_icons(ICONS - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-laptopconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-laptopdisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-laptoptrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-smartphoneconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-smartphonedisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-smartphonetrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-tabletconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-tabletdisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-tablettrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-tvconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-tvdisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/16-status-tvtrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-laptopconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-laptopdisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-laptoptrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-smartphoneconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-smartphonedisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-smartphonetrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-tabletconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-tabletdisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-tablettrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-tvconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-tvdisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/22-status-tvtrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-laptopconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-laptopdisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-laptoptrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-smartphoneconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-smartphonedisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-smartphonetrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-tabletconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-tabletdisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-tablettrusted.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-tvconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-tvdisconnected.svg - ${CMAKE_CURRENT_SOURCE_DIR}/status/32-status-tvtrusted.svg - DESTINATION ${ICON_INSTALL_DIR}) diff --git a/icons/custom_icons.qrc b/icons/custom_icons.qrc new file mode 100644 index 000000000..e691d21a4 --- /dev/null +++ b/icons/custom_icons.qrc @@ -0,0 +1,46 @@ + + + + + status/16-status-laptopconnected.svg + status/16-status-laptopdisconnected.svg + status/16-status-laptoptrusted.svg + status/16-status-smartphoneconnected.svg + status/16-status-smartphonedisconnected.svg + status/16-status-smartphonetrusted.svg + status/16-status-tabletconnected.svg + status/16-status-tabletdisconnected.svg + status/16-status-tablettrusted.svg + status/16-status-tvconnected.svg + status/16-status-tvdisconnected.svg + status/16-status-tvtrusted.svg + + + status/22-status-laptopconnected.svg + status/22-status-laptopdisconnected.svg + status/22-status-laptoptrusted.svg + status/22-status-smartphoneconnected.svg + status/22-status-smartphonedisconnected.svg + status/22-status-smartphonetrusted.svg + status/22-status-tabletconnected.svg + status/22-status-tabletdisconnected.svg + status/22-status-tablettrusted.svg + status/22-status-tvconnected.svg + status/22-status-tvdisconnected.svg + status/22-status-tvtrusted.svg + + + status/32-status-laptopconnected.svg + status/32-status-laptopdisconnected.svg + status/32-status-laptoptrusted.svg + status/32-status-smartphoneconnected.svg + status/32-status-smartphonedisconnected.svg + status/32-status-smartphonetrusted.svg + status/32-status-tabletconnected.svg + status/32-status-tabletdisconnected.svg + status/32-status-tablettrusted.svg + status/32-status-tvconnected.svg + status/32-status-tvdisconnected.svg + status/32-status-tvtrusted.svg + + diff --git a/indicator/CMakeLists.txt b/indicator/CMakeLists.txt index 0686be684..854a11529 100644 --- a/indicator/CMakeLists.txt +++ b/indicator/CMakeLists.txt @@ -7,9 +7,12 @@ 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 + ${kdeconnect_custom_icons_SRCS} ) include(ECMAddAppIcon) diff --git a/indicator/deviceindicator.cpp b/indicator/deviceindicator.cpp index 349fa5a6b..7d0737acc 100644 --- a/indicator/deviceindicator.cpp +++ b/indicator/deviceindicator.cpp @@ -58,11 +58,7 @@ DeviceIndicator::DeviceIndicator(DeviceDbusInterface* device) , m_device(device) , m_remoteCommandsInterface(new RemoteCommandsDbusInterface(m_device->id())) { -#ifdef Q_OS_WIN - setIcon(QIcon(QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("icons/hicolor/scalable/status/") + device->iconName() + QStringLiteral(".svg")))); -#else setIcon(QIcon::fromTheme(device->iconName())); -#endif connect(device, SIGNAL(nameChanged(QString)), this, SLOT(setText(QString))); diff --git a/settings/CMakeLists.txt b/settings/CMakeLists.txt index 3fa16f703..2358dbc3e 100644 --- a/settings/CMakeLists.txt +++ b/settings/CMakeLists.txt @@ -1,6 +1,12 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-settings") -add_executable(kdeconnect-settings main.cpp) +qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) + +add_executable(kdeconnect-settings + main.cpp + ${kdeconnect_custom_icons_SRCS} +) + target_link_libraries(kdeconnect-settings kdeconnectversion KF5::I18n KF5::KCMUtils KF5::DBusAddons) install(TARGETS kdeconnect-settings ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/smsapp/CMakeLists.txt b/smsapp/CMakeLists.txt index 1913ff1ab..7c09af54c 100644 --- a/smsapp/CMakeLists.txt +++ b/smsapp/CMakeLists.txt @@ -35,6 +35,8 @@ target_link_libraries(kdeconnectsmshelper kdeconnectinterfaces ) +qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) + add_executable(kdeconnect-sms main.cpp conversationlistmodel.cpp @@ -43,6 +45,7 @@ add_executable(kdeconnect-sms resources.qrc thumbnailsprovider.cpp attachmentinfo.cpp + ${kdeconnect_custom_icons_SRCS} ${sms_debug_files_SRCS}) target_link_libraries(kdeconnect-sms