Warn if we use deprecated methods from Qt modules

This change will cause any use of methods and classes declared with
Q_DECL_DEPRECATED to produce a warning in the compilation
output. Those warnings need to be silenced before the Qt 5.0 release,
preferably before the beta.

Change-Id: I28ce133867cc5918e177c57f6e5f7ab9421989ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Thiago Macieira 2011-10-19 23:51:17 +02:00 committed by Qt by Nokia
parent f1b324a83c
commit 0df1c9f1fa

View File

@ -143,6 +143,7 @@ contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
DEFINES *= QT_USE_QSTRINGBUILDER DEFINES *= QT_USE_QSTRINGBUILDER
DEFINES *= QT_DEPRECATED_WARNINGS
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end