From ac9be327f8dc788a964b77c6bcdf0391c85c9cbd Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 20 Sep 2012 15:06:11 +0200 Subject: 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 --- dist/changes-5.0.0 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dist/changes-5.0.0') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index b5f63c3600..795cb88935 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -62,6 +62,11 @@ information about a particular change. - qIsDetached<> has been removed without replacement. +- The return type of QFlags::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 + enum). + - QMetaType: * QMetaType::construct() has been renamed to QMetaType::create(). * QMetaType::unregisterType() has been removed. -- cgit v1.2.3