[Development] Qt 5 Deprecation warnings explosion

Friedemann Kleint Friedemann.Kleint at nokia.com
Tue Aug 21 17:36:33 CEST 2012


Hi,

compiling Qt 5 with gcc currently produces a massive amount of compiler 
warnings:

./../include/QtGui/../../src/gui/kernel/qevent.h:798:82: warning: 
'DeviceType' is deprecated (declared at 
../../inclugui/kernel/qevent.h:782) [-Wdeprecated-declarations]
In file included from ../../include/QtGui/qevent.h:1:0 (repeated many 
times).

The reason is  in class QTouchEvent:

#if QT_DEPRECATED_SINCE(5, 0)
     enum QT_DEPRECATED DeviceType { }
#endif
#if QT_DEPRECATED_SINCE(5, 0)
798:    QT_DEPRECATED inline QTouchEvent::DeviceType deviceType() const 
{ return static_cast<DeviceType>(int(_device->type())); }
#endif

De-inlining the function does not help here, apparently using a 
deprecated return type in the declaration is already sufficient to 
trigger it.
So, I currently don't know how to silence this - ideas welcome. Maybe 
just de-deprecate the enumeration?

I also would like to appeal to everyone to please check whether patches 
introduce warnings, ideally on all supported platforms ("make -s clean; 
make -s"   helps).

Regards,
Friedemann

-- 
Friedemann Kleint
Qt Open Source Team
Nokia, Qt Development Frameworks





More information about the Development mailing list