From f46e19924a1c0a5ac3f1d2a489f8017a5e143fda Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 10 Aug 2021 15:23:08 +0200 Subject: Turn EventStatus from a class to a namespace This wrapper only exists for an enum inside of it and dates back to times when Qt meta-object system did not support free-standing enums. --- lib/eventitem.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/eventitem.h b/lib/eventitem.h index 1986ba77..a5f381f0 100644 --- a/lib/eventitem.h +++ b/lib/eventitem.h @@ -11,9 +11,9 @@ namespace Quotient { class StateEventBase; -class EventStatus { - Q_GADGET -public: +namespace EventStatus { + Q_NAMESPACE + /** Special marks an event can assume * * This is used to hint at a special status of some events in UI. @@ -32,8 +32,8 @@ public: Hidden = 0x100, //< The event should not be shown in the timeline }; Q_DECLARE_FLAGS(Status, Code) - Q_FLAG(Status) -}; + Q_FLAG_NS(Status) +} // namespace EventStatus class EventItemBase { public: @@ -148,4 +148,4 @@ inline QDebug& operator<<(QDebug& d, const TimelineItem& ti) return d; } } // namespace Quotient -Q_DECLARE_METATYPE(Quotient::EventStatus) +//Q_DECLARE_METATYPE(Quotient::EventStatus) -- cgit v1.2.3