diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-06-08 11:43:27 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-12 11:04:04 +0200 |
commit | 6618dd877f83be56d140882a2f6c3fa5a985c2d2 (patch) | |
tree | d845b4d790b22086722ecf6966ea3e386c2e7bb1 /src/corelib/global/qglobal.h | |
parent | a3ac4f26e1bc699f1e4ef15853d6db32f13d5c7f (diff) |
Introduce QT_DEPRECATED_SINCE
To be used to versionize deprecated symbols
Symbols deprecated in Qt 5.0 need to be inlined
Change-Id: I696a834c25b7e86acf14ae081ea91ef993a5b19e
Reviewed-on: http://codereview.qt.nokia.com/431
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 15145ced07..1358ea62df 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -54,6 +54,23 @@ */ #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) +#endif + +/* + QT_DEPRECATED_SINCE(major, minor) evaluates as true if the Qt version is greater than + the deprecation point specified. + + Use it to specify from which version of Qt a function or class has been deprecated + + Example: + #if QT_DEPRECATED_SINCE(5,1) + QT_DEPRECATED void deprecatedFunction(); //function deprecated sine Qt 5.1 + #endif + */ +#define QT_DEPRECATED_SINCE(major, minor) (QT_VERSION_CHECK(major, minor, 0) > QT_DISABLE_DEPRECATED_BEFORE) + #define QT_PACKAGEDATE_STR "YYYY-MM-DD" #define QT_PACKAGE_TAG "" |