From 85c180d625703b8903709178e81d6c07c104e1dd Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 13 Nov 2023 23:32:44 +0100 Subject: [PATCH] Fix checks for Plasma 6 The alpha defines the macros ``` #define PLASMA_VERSION_MAJOR 5 #define PLASMA_VERSION_MINOR 27 #define PLASMA_VERSION_PATCH 80 ``` so the current version checks (which were created based on the macros from a development build) are not working. I have no clue how these numbers are crafted so it is supposedly the easiest to just check for Qt 6 as Qt itself uses a sane versioning system. --- plasmoid/lib/syncthingapplet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plasmoid/lib/syncthingapplet.cpp b/plasmoid/lib/syncthingapplet.cpp index 0120b88..140d4a6 100644 --- a/plasmoid/lib/syncthingapplet.cpp +++ b/plasmoid/lib/syncthingapplet.cpp @@ -69,7 +69,7 @@ static inline QPalette paletteFromTheme(const Plasma::Theme &theme) } SyncthingApplet::SyncthingApplet(QObject *parent, const QVariantList &data) -#if PLASMA_VERSION >= QT_VERSION_CHECK(5, 240, 0) +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) : Applet(parent, KPluginMetaData(), data) #else : Applet(parent, data) @@ -682,7 +682,7 @@ void SyncthingApplet::handleSystemdStatusChanged() } // namespace Plasmoid -#if PLASMA_VERSION >= QT_VERSION_CHECK(5, 240, 0) +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) namespace Plasmoid { K_PLUGIN_CLASS(SyncthingApplet) }