summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-06-28 14:43:27 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-01 06:58:36 +0100
commitdd987a9ef08933b970387dac1f9bdd930ca9656c (patch)
tree23bfe015a08ec2c41e7e9e18112e104ea34af5e6 /src/corelib/global/qglobal.cpp
parent9c9f609313b6a0ddf8e226b291324c97b504d07f (diff)
Add other integer overloads to QFlag's constructor
This avoids "change of sign" warnings as found by ICC when the high bit is set. This often happens when you do X & ~Y as ~Y probably has bit 31 on. If the enum is unsigned, then there's a sign conversion. Change-Id: Ia5f221d928ac0155f4504a70c4046e60c25fbf3b Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
-rw-r--r--src/corelib/global/qglobal.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index e0a78d8533..e84c31eecf 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -115,12 +115,40 @@ Q_STATIC_ASSERT_X(UCHAR_MAX == 255, "Qt assumes that char is 8 bits");
*/
/*!
+ \fn QFlag::QFlag(uint value)
+ \since Qt 5.3
+
+ Constructs a QFlag object that stores the given \a value.
+*/
+
+/*!
+ \fn QFlag::QFlag(short value)
+ \since 5.3
+
+ Constructs a QFlag object that stores the given \a value.
+*/
+
+/*!
+ \fn QFlag::QFlag(ushort value)
+ \since Qt 5.3
+
+ Constructs a QFlag object that stores the given \a value.
+*/
+
+/*!
\fn QFlag::operator int() const
Returns the value stored by the QFlag object.
*/
/*!
+ \fn QFlag::operator uint() const
+ \since Qt 5.3
+
+ Returns the value stored by the QFlag object.
+*/
+
+/*!
\class QFlags
\inmodule QtCore
\brief The QFlags class provides a type-safe way of storing