From 595e8d9a3542128bc38c520c1d5c4bf71e29ce44 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Tue, 30 Apr 2019 19:09:26 +0200 Subject: [PATCH] Add Macro for MinGW and fix GUID Macro Fix for Windows building --- plugins/systemvolume/systemvolumeplugin-win.cpp | 2 ++ plugins/systemvolume/systemvolumeplugin-win.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/plugins/systemvolume/systemvolumeplugin-win.cpp b/plugins/systemvolume/systemvolumeplugin-win.cpp index 3715eb646..d01cf585c 100644 --- a/plugins/systemvolume/systemvolumeplugin-win.cpp +++ b/plugins/systemvolume/systemvolumeplugin-win.cpp @@ -263,9 +263,11 @@ bool SystemvolumePlugin::sendSinkList() name = QString::fromWCharArray(deviceProperty.pwszVal); //PropVariantClear(&deviceProperty); +#ifndef __MINGW32__ deviceProperties->GetValue(PKEY_Device_DeviceDesc, &deviceProperty); desc = QString::fromWCharArray(deviceProperty.pwszVal); //PropVariantClear(&deviceProperty); +#endif QJsonObject sinkObject; sinkObject.insert("name", name); diff --git a/plugins/systemvolume/systemvolumeplugin-win.h b/plugins/systemvolume/systemvolumeplugin-win.h index 75a4aee0e..e982b28ee 100644 --- a/plugins/systemvolume/systemvolumeplugin-win.h +++ b/plugins/systemvolume/systemvolumeplugin-win.h @@ -30,6 +30,10 @@ #include #include +#ifdef __MINGW32__ +#include +#endif + #define PACKET_TYPE_SYSTEMVOLUME QStringLiteral("kdeconnect.systemvolume") #define PACKET_TYPE_SYSTEMVOLUME_REQUEST QStringLiteral("kdeconnect.systemvolume.request")