From 1fe8fb81b14c4cf1f2515701055f2e03aabe271b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 26 Oct 2011 20:25:35 +0200 Subject: [PATCH] Enable deprecated feature for now Rationale is that it makes it possible to deprecate functions without breaking other modules. After the feature freeze, this should be reset to 5 Notice that QT_DEPRECATED is not defined while bootstrapping Qt (QT_NO_DEPRECATED defined) This also means that compilation is tested Change-Id: I85f0e65ac3a160e9aba3833787ded3f94304cb90 Reviewed-by: David Faure --- src/corelib/global/qglobal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 1bc93376ee..acd777037f 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -55,7 +55,8 @@ #define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) #ifndef QT_DISABLE_DEPRECATED_BEFORE -#define QT_DISABLE_DEPRECATED_BEFORE QT_VERSION_CHECK(5, 0, 0) +// ### Qt5: remember to change that to 5 when we reach feature freeze +#define QT_DISABLE_DEPRECATED_BEFORE QT_VERSION_CHECK(4, 9, 0) #endif /* @@ -69,7 +70,7 @@ QT_DEPRECATED void deprecatedFunction(); //function deprecated since Qt 5.1 #endif */ -#define QT_DEPRECATED_SINCE(major, minor) (QT_VERSION_CHECK(major, minor, 0) > QT_DISABLE_DEPRECATED_BEFORE) +#define QT_DEPRECATED_SINCE(major, minor) (defined(QT_DEPRECATED) && QT_VERSION_CHECK(major, minor, 0) > QT_DISABLE_DEPRECATED_BEFORE) #define QT_PACKAGEDATE_STR "YYYY-MM-DD"