From f4425af712afc6ad704a39b93c912432bd3c1914 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 2 Jun 2023 22:43:05 +0200 Subject: [PATCH] Work around Qt MOC limitations --- include/mtx/events/collections.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/mtx/events/collections.hpp b/include/mtx/events/collections.hpp index e9657887..02656b18 100644 --- a/include/mtx/events/collections.hpp +++ b/include/mtx/events/collections.hpp @@ -212,6 +212,11 @@ struct TimelineEvents { using variant::variant; + // The Qt MOC chokes on this, because the default implementation from the variant gets into some + // conflict with the variant types not having an operator==. Being explicit fixes that. + bool operator==(const TimelineEvents &) const = delete; + bool operator<(const TimelineEvents &) const = delete; + friend void from_json(const nlohmann::json &obj, TimelineEvents &e); friend void to_json(nlohmann::json &obj, const TimelineEvents &e); };