Don't use the union trick to do unlawful casts
authorThiago Macieira <thiago.macieira@intel.com>
Sat, 22 Dec 2012 02:26:09 +0000 (18:26 -0800)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 28 Jan 2013 03:02:45 +0000 (04:02 +0100)
commitadd16725a34f7d249c9e93d9ecbfc0c7cc488d80
tree0c5d67dfc3c156bd210adeaecfa890e430cf2114
parent8a0a09f6d1cbeba0a88402c4318b1caaefa90d06
Don't use the union trick to do unlawful casts

GCC 4.7 is printing this (bogus) warning:
qobject.h:166:15: warning: 'QObject::findChildren(const QString&, Qt::FindChildOptions) const [with T = QMenuBar*; Qt::FindChildOptions = QFlags<Qt::FindChildOption>]::<anonymous union>' declared with greater visibility than the type of its field 'QObject::findChildren(const QString&, Qt::FindChildOptions) const [with T = QMenuBar*; Qt::FindChildOptions = QFlags<Qt::FindChildOption>]::<anonymous union>::typedList' [-Wattributes]

Change-Id: I2d1c365e3191f3a5c7b2241deb35f0ae47d79afc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/kernel/qobject.h