Port to KStatusNotifierItem framework

This commit is contained in:
Nicolas Fella 2023-08-16 13:51:44 +02:00
parent 341b5dc006
commit 0baeece353
3 changed files with 9 additions and 0 deletions

View file

@ -52,6 +52,7 @@ Dependencies:
- 'on': ['Linux/Qt6', 'FreeBSD/Qt6'] - 'on': ['Linux/Qt6', 'FreeBSD/Qt6']
'require': 'require':
'frameworks/kpackage': '@latest-kf6' 'frameworks/kpackage': '@latest-kf6'
'frameworks/kstatusnotifieritem': '@latest-kf6'
'libraries/pulseaudio-qt': '@latest-kf6' 'libraries/pulseaudio-qt': '@latest-kf6'
'libraries/plasma-wayland-protocols': '@latest-kf6' 'libraries/plasma-wayland-protocols': '@latest-kf6'
- 'on': ['Linux/Qt6'] - 'on': ['Linux/Qt6']

View file

@ -95,6 +95,10 @@ set_package_properties(KF5PeopleVCard PROPERTIES
TYPE RUNTIME TYPE RUNTIME
) )
if (QT_MAJOR_VERSION STREQUAL "6" AND NOT WIN32)
find_package(KF6StatusNotifierItem ${KF_MIN_VERSION} REQUIRED)
endif()
#ecm_find_qmlmodule(org.kde.people 1.0) FIXME This results in KPeople code being called which triggers DBus calls which breaks the Windows CI #ecm_find_qmlmodule(org.kde.people 1.0) FIXME This results in KPeople code being called which triggers DBus calls which breaks the Windows CI
ecm_find_qmlmodule(QtQuick.Particles 2.0) ecm_find_qmlmodule(QtQuick.Particles 2.0)

View file

@ -49,6 +49,10 @@ if (WIN32)
target_link_libraries(kdeconnect-indicator windowsapp) target_link_libraries(kdeconnect-indicator windowsapp)
endif() endif()
if (QT_MAJOR_VERSION STREQUAL "6" AND NOT WIN32)
target_link_libraries(kdeconnect-indicator KF6::StatusNotifierItem)
endif()
if (APPLE) if (APPLE)
# Apple frameworks # Apple frameworks
target_link_libraries(kdeconnect-indicator "-framework AppKit") target_link_libraries(kdeconnect-indicator "-framework AppKit")