summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qflags.h2
-rw-r--r--src/corelib/global/qglobal.cpp14
2 files changed, 16 insertions, 0 deletions
diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h
index 8fb6cb09a3..0b7f3f7d6c 100644
--- a/src/corelib/global/qflags.h
+++ b/src/corelib/global/qflags.h
@@ -117,6 +117,7 @@ public:
constexpr inline QFlags &operator&=(int mask) noexcept { i &= mask; return *this; }
constexpr inline QFlags &operator&=(uint mask) noexcept { i &= mask; return *this; }
+ constexpr inline QFlags &operator&=(QFlags mask) noexcept { i &= mask.i; return *this; }
constexpr inline QFlags &operator&=(Enum mask) noexcept { i &= Int(mask); return *this; }
constexpr inline QFlags &operator|=(QFlags other) noexcept { i |= other.i; return *this; }
constexpr inline QFlags &operator|=(Enum other) noexcept { i |= Int(other); return *this; }
@@ -131,6 +132,7 @@ public:
constexpr inline QFlags operator^(Enum other) const noexcept { return QFlags(QFlag(i ^ Int(other))); }
constexpr inline QFlags operator&(int mask) const noexcept { return QFlags(QFlag(i & mask)); }
constexpr inline QFlags operator&(uint mask) const noexcept { return QFlags(QFlag(i & mask)); }
+ constexpr inline QFlags operator&(QFlags other) const noexcept { return QFlags(QFlag(i & other.i)); }
constexpr inline QFlags operator&(Enum other) const noexcept { return QFlags(QFlag(i & Int(other))); }
constexpr inline QFlags operator~() const noexcept { return QFlags(QFlag(~i)); }
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 8753ac65f4..c1a6e7a268 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -378,6 +378,13 @@ static_assert(sizeof(qint64) == 8, "Internal error, qint64 is misdefined");
*/
/*!
+ \fn template <typename Enum> QFlags &QFlags<Enum>::operator&=(QFlags mask)
+ \since 6.2
+
+ \overload
+*/
+
+/*!
\fn template <typename Enum> QFlags &QFlags<Enum>::operator|=(QFlags other)
Performs a bitwise OR operation with \a other and stores the
@@ -467,6 +474,13 @@ static_assert(sizeof(qint64) == 8, "Internal error, qint64 is misdefined");
*/
/*!
+ \fn template <typename Enum> QFlags QFlags<Enum>::operator&(QFlags mask) const
+ \since 6.2
+
+ \overload
+*/
+
+/*!
\fn template <typename Enum> QFlags QFlags<Enum>::operator~() const
Returns a QFlags object that contains the bitwise negation of