From 935d874d57cd89e988ec7670e80d248804924b21 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 14 Oct 2024 06:02:18 +0000 Subject: [PATCH] plugins/systemvolume: Remove workaround for mingw toolchain This reverts the change from 595e8d9a3542128bc38c520c1d5c4bf71e29ce44 and a01af1b406213fe00901b748787f185b89f4dee2 commit. PKEY_Device_DeviceDesc was added in mingw-w64 headers in the following commit. https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0b02ea1d7dbf8afbaced7122a8a2fa715e0db0cf/ https://github.com/mingw-w64/mingw-w64/commit/0b02ea1d7dbf8afbaced7122a8a2fa715e0db0cf (mirror) --- plugins/systemvolume/systemvolumeplugin-win.cpp | 9 +-------- plugins/systemvolume/systemvolumeplugin-win.h | 4 ---- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/plugins/systemvolume/systemvolumeplugin-win.cpp b/plugins/systemvolume/systemvolumeplugin-win.cpp index c3fb79afa..0489c8d2f 100644 --- a/plugins/systemvolume/systemvolumeplugin-win.cpp +++ b/plugins/systemvolume/systemvolumeplugin-win.cpp @@ -203,12 +203,9 @@ public: // This callback is supper spammy. Care only about name and description changes. if (IsEqualPropertyKey(key, PKEY_Device_FriendlyName)) { enclosing.sendSinkList(); - } -#ifndef __MINGW32__ - else if (IsEqualPropertyKey(key, PKEY_Device_DeviceDesc)) { + } else if (IsEqualPropertyKey(key, PKEY_Device_DeviceDesc)) { enclosing.sendSinkList(); } -#endif return S_OK; } @@ -302,13 +299,9 @@ 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); -#else - desc = name; -#endif QJsonObject sinkObject; sinkObject.insert(QStringLiteral("name"), name); diff --git a/plugins/systemvolume/systemvolumeplugin-win.h b/plugins/systemvolume/systemvolumeplugin-win.h index 3c3fb8327..6a868b63d 100644 --- a/plugins/systemvolume/systemvolumeplugin-win.h +++ b/plugins/systemvolume/systemvolumeplugin-win.h @@ -15,10 +15,6 @@ #include #include -#ifdef __MINGW32__ -#include -#endif - #define PACKET_TYPE_SYSTEMVOLUME QStringLiteral("kdeconnect.systemvolume") #define PACKET_TYPE_SYSTEMVOLUME_REQUEST QStringLiteral("kdeconnect.systemvolume.request")