diff options
Diffstat (limited to 'lib/quotient_common.h')
-rw-r--r-- | lib/quotient_common.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/quotient_common.h b/lib/quotient_common.h index e1e14a14..0e3e2a40 100644 --- a/lib/quotient_common.h +++ b/lib/quotient_common.h @@ -9,10 +9,10 @@ // See https://bugreports.qt.io/browse/QTBUG-82295 - despite the comment that // Q_FLAG[_NS] "should" be applied to the enum only, Qt doesn't allow to wrap -// a flag type into a QVariant then. The macros below define Q_FLAG_NS and on -// top of that add a part of Q_ENUM() that enables the metatype data but goes -// under the moc radar to avoid double registration of the same data in the map -// defined in moc_*.cpp +// a flag type into a QVariant then. The macros below define Q_FLAG[_NS] and on +// top of that add Q_ENUM[_NS]_IMPL which is a part of Q_ENUM() macro that +// enables the metatype data but goes under the moc radar to avoid double +// registration of the same data in the map defined in moc_*.cpp #define QUO_DECLARE_FLAGS(Flags, Enum) \ Q_DECLARE_FLAGS(Flags, Enum) \ Q_ENUM_IMPL(Enum) \ @@ -23,6 +23,9 @@ Q_ENUM_NS_IMPL(Enum) \ Q_FLAG_NS(Flags) +#define DECL_DEPRECATED_ENUMERATOR(Deprecated, Recommended) \ + Deprecated Q_DECL_ENUMERATOR_DEPRECATED_X("Use " #Recommended) = Recommended + namespace Quotient { Q_NAMESPACE @@ -87,7 +90,6 @@ constexpr inline auto JoinStateStrings = make_array( //! So far only background/foreground flags are available. //! \sa Connection::callApi, Connection::run enum RunningPolicy { ForegroundRequest = 0x0, BackgroundRequest = 0x1 }; - Q_ENUM_NS(RunningPolicy) //! \brief The result of URI resolution using UriResolver @@ -115,9 +117,3 @@ constexpr inline auto RoomTypeStrings = make_array( } // namespace Quotient Q_DECLARE_OPERATORS_FOR_FLAGS(Quotient::MembershipMask) Q_DECLARE_OPERATORS_FOR_FLAGS(Quotient::JoinStates) - -class QDebug; -QDebug operator<<(QDebug dbg, Quotient::Membership m); -QDebug operator<<(QDebug dbg, Quotient::MembershipMask m); -QDebug operator<<(QDebug dbg, Quotient::JoinState js); -QDebug operator<<(QDebug dbg, Quotient::JoinStates js); |