summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-09-20 15:06:11 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-28 23:50:10 +0200
commitac9be327f8dc788a964b77c6bcdf0391c85c9cbd (patch)
treee7f66c52a02cf1a8c260c47d1bba0d400acad82a /src/corelib/global/qglobal.cpp
parent26f238a80d38d6e1da0a6d485dd0b185b73c46ef (diff)
QFlags: use unsigned int when the enum's underlying is unsigned
Replace storage and operator int() return types with unsigned int if the enum is unsigned. This fixes a number of exisiting warnings, in particular with Qt::MouseButton under GCC. Change-Id: Ia12d36212329aec3e9d62a5fbd38809a6c2b36d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
-rw-r--r--src/corelib/global/qglobal.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index ef211cfce2..805868f4c6 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -172,6 +172,15 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n);
*/
/*!
+ \typedef QFlags::Int
+ \since 5.0
+
+ Typedef for the integer type used for storage as well as for
+ implicit conversion. Either \c int or \c{unsigned int}, depending
+ on whether the enum's underlying type is signed or unsigned.
+*/
+
+/*!
\typedef QFlags::enum_type
Typedef for the Enum template type.
@@ -261,9 +270,11 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n);
*/
/*!
- \fn QFlags::operator int() const
+ \fn QFlags::operator Int() const
Returns the value stored in the QFlags object as an integer.
+
+ \sa Int
*/
/*!