From 3a234066ef501d95d63ed000cacd44efa12a30cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Thu, 7 Aug 2025 13:40:56 +0200 Subject: [PATCH] Fix qt5 build and test not overloading == operator --- libnymea-core/ruleengine/stateevaluator.cpp | 2 +- libnymea/typeutils.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libnymea-core/ruleengine/stateevaluator.cpp b/libnymea-core/ruleengine/stateevaluator.cpp index a94e2427..e2fbe8b3 100644 --- a/libnymea-core/ruleengine/stateevaluator.cpp +++ b/libnymea-core/ruleengine/stateevaluator.cpp @@ -424,7 +424,7 @@ bool StateEvaluator::evaluateDescriptor(const StateDescriptor &descriptor) const return result; #else - bool res = convertedValue.convert(state.value().type()); + bool res = descriptorValue.convert(state.value().type()); if (!res) { return false; } diff --git a/libnymea/typeutils.h b/libnymea/typeutils.h index 22c5df0b..68db41ff 100644 --- a/libnymea/typeutils.h +++ b/libnymea/typeutils.h @@ -48,9 +48,6 @@ public: \ type##Id(): QUuid() {} \ type##Id(const QString &uuidString): QUuid(QAnyStringView(uuidString)) {} \ static type##Id create##type##Id() { return type##Id(QUuid::createUuid()); } \ - bool operator==(const type##Id &other) const { \ - return toString() == other.toString(); \ - } \ }; \ Q_DECLARE_METATYPE(type##Id); #else @@ -64,7 +61,7 @@ Q_DECLARE_METATYPE(type##Id); return toString() == other.toString(); \ } \ }; \ - Q_DECLARE_METATYPE(type##Id); +Q_DECLARE_METATYPE(type##Id); #endif DECLARE_TYPE_ID(Vendor)