summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-07-13 20:40:09 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-18 19:48:59 +0200
commit27508324106da02c7fddb066801f40d1428d1437 (patch)
tree31ae28c2a53e28a1bc42e7b29a78e13fc1740714
parent8683ee14ccca0c51d126ba6f978d752097f992ab (diff)
Make the QIncompatibleFlag constexpr.
Change-Id: If99b43b45cc667449dbe7c487b56885c6ce9b1c7 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/global/qflags.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h
index d3e812aff1..b578177aaf 100644
--- a/src/corelib/global/qflags.h
+++ b/src/corelib/global/qflags.h
@@ -62,11 +62,11 @@ class QIncompatibleFlag
{
int i;
public:
- inline explicit QIncompatibleFlag(int i);
+ Q_DECL_CONSTEXPR inline explicit QIncompatibleFlag(int i);
inline operator int() const { return i; }
};
-inline QIncompatibleFlag::QIncompatibleFlag(int ai) : i(ai) {}
+Q_DECL_CONSTEXPR inline QIncompatibleFlag::QIncompatibleFlag(int ai) : i(ai) {}
#ifndef Q_NO_TYPESAFE_FLAGS
@@ -114,7 +114,7 @@ public:
typedef QFlags<Enum> Flags;
#define Q_DECLARE_INCOMPATIBLE_FLAGS(Flags) \
-inline QIncompatibleFlag operator|(Flags::enum_type f1, int f2) \
+Q_DECL_CONSTEXPR inline QIncompatibleFlag operator|(Flags::enum_type f1, int f2) \
{ return QIncompatibleFlag(int(f1) | f2); }
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags) \