summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-09-04 23:18:47 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-13 19:12:09 +0200
commitaef44c7970457cc2b673429f8e632e4ac2ee3510 (patch)
tree114d0fe88bdef4b92556c8c54d9323f68475e1ed /src/gui
parentc1c715f800d3c79eed8305f4b4be9bff8a81fda3 (diff)
Don't use an extension to the C++ language in public headers
According to Clang 3.3, this is an extension: qpalette.h:178:9: error: anonymous types declared in an anonymous union are an extension [-Werror,-Wnested-anon-types] qsizepolicy.h:148:9: error: anonymous types declared in an anonymous union are an extension [-Werror,-Wnested-anon-types] If you try to simply give the struct a name, it complains with: qpalette.h:178:16: error: types cannot be declared in an anonymous union Change-Id: I61c69b8e42a1f4c4a15a0733f2d7efa0b3e44864 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qpalette.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index 2248f6727e..9abca30f12 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -174,11 +174,12 @@ private:
void detach();
QPalettePrivate *d;
+ struct Data {
+ uint current_group : 4;
+ uint resolve_mask : 28;
+ };
union {
- struct {
- uint current_group : 4;
- uint resolve_mask : 28;
- } data;
+ Data data;
quint32 for_faster_swapping_dont_use;
};
friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &s, const QPalette &p);