Make the QIncompatibleFlag constexpr.

Change-Id: If99b43b45cc667449dbe7c487b56885c6ce9b1c7
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Stephen Kelly 2012-07-13 20:40:09 +02:00 committed by Qt by Nokia
parent 8683ee14cc
commit 2750832410

View File

@ -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) \