|author||Marc Mutz <email@example.com>||2012-09-20 15:06:11 +0200|
|committer||The Qt Project <firstname.lastname@example.org>||2012-09-28 23:50:10 +0200|
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 <email@example.com>
Diffstat (limited to 'dist')
1 files changed, 5 insertions, 0 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index b5f63c3600..795cb88935 100644
@@ -62,6 +62,11 @@ information about a particular change.
- qIsDetached<> has been removed without replacement.
+- The return type of QFlags<Enum>::operator int() now matches the Enum's underlying
+ type in signedness instead of always being 'int'. This was done in order to allow
+ QFlags over enums whose underlying type is unsigned (Qt::MouseButton is one such
* QMetaType::construct() has been renamed to QMetaType::create().
* QMetaType::unregisterType() has been removed.