From a67a99a7d6f6de7c5f0d7f474afe2fb8f0472e75 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Tue, 14 May 2019 22:16:41 +0200 Subject: [PATCH] Don't try to use PulseAudioQt on Windows --- plugins/findthisdevice/CMakeLists.txt | 6 +++++- plugins/findthisdevice/findthisdeviceplugin.cpp | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/findthisdevice/CMakeLists.txt b/plugins/findthisdevice/CMakeLists.txt index 4ec4588d4..f32602ad4 100644 --- a/plugins/findthisdevice/CMakeLists.txt +++ b/plugins/findthisdevice/CMakeLists.txt @@ -11,9 +11,13 @@ target_link_libraries(kdeconnect_findthisdevice Qt5::Core Qt5::Multimedia Qt5::DBus - KF5::PulseAudioQt ) +if (NOT WIN32) + target_link_libraries(kdeconnect_findthisdevice + KF5::PulseAudioQt + ) +endif() set(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.cpp) ki18n_wrap_ui(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.ui) diff --git a/plugins/findthisdevice/findthisdeviceplugin.cpp b/plugins/findthisdevice/findthisdeviceplugin.cpp index e2e233761..e10185185 100644 --- a/plugins/findthisdevice/findthisdeviceplugin.cpp +++ b/plugins/findthisdevice/findthisdeviceplugin.cpp @@ -22,8 +22,11 @@ // KF #include + +#ifndef Q_OS_WIN #include #include +#endif // Qt #include #include @@ -94,6 +97,7 @@ bool FindThisDevicePlugin::receivePacket(const NetworkPacket& np) player->setVolume(100); player->play(); +#ifndef Q_OS_WIN const auto sinks = PulseAudioQt::Context::instance()->sinks(); QVector mutedSinks; @@ -110,6 +114,7 @@ bool FindThisDevicePlugin::receivePacket(const NetworkPacket& np) sink->setMuted(true); } }); +#endif // TODO: ensure to use built-in loudspeakers