diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-09-17 15:04:03 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-09-20 15:05:36 +0200 |
commit | 44028a227eb72ce65c971e5fabde1abdd2adfdb0 (patch) | |
tree | 5ae1c5d15230d727059c3f1d959ef8bbebff52cc /src/corelib/global/qglobal.h | |
parent | 7943480f0f0cf130f4ca104d7e9235bbb2ba6ec2 (diff) |
Encourage use of QT_VERSION_CHECK()
Document that QT_VERSION should normally be compared against it,
rather than raw hex, and mildly update the example versions used in
docs. (Left the snippets testing old version, since the code in which
the #if-ery is used might actually make sense for those versions.)
Improve related documentation in the process.
Change-Id: Id3e97f41bfb0f81a117cf7b3a3ccd5f244e2a99a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 3fabac3888..429da158d3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -53,11 +53,11 @@ #endif /* - QT_VERSION is (major << 16) + (minor << 8) + patch. + QT_VERSION is (major << 16) | (minor << 8) | patch. */ #define QT_VERSION QT_VERSION_CHECK(QT_VERSION_MAJOR, QT_VERSION_MINOR, QT_VERSION_PATCH) /* - can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) + can be used like #if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)) */ #define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) |