diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-05-02 12:54:23 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-05-08 12:23:15 +0000 |
commit | 471c565ef59bfec671b46c6771b9bb126da40b9f (patch) | |
tree | 028c4b8564437c3c7c23ed254b804aa41ecdd5a7 /src/gui/text | |
parent | d467a2742a1549c07155c812d57ea7a2d9c70094 (diff) |
Use Q_CC_{GNU,MSVC}_ONLY when comparing to particular versions
This prevents false-negatives and false-positives, as e.g. Clang
10.0.0 masks as GCC 4.2, so Q_CC_GNU is 402 on that
compiler. Depending on the test (Q_CC_GNU > NNN or Q_CC_GNU < NNN),
the result of the test is almost random.
Q_CC_<comp>_ONLY makes sure we match only GCC or MSVC, not bycatch
such as Clang or ICC.
Manual conflict resolutions:
- dropped change around Q_CONSTINIT, which doesn't exist < 6.4
Change-Id: I4c550a11ecf85fc9a2216b330b69bd03d45b47e0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit cdd4a953171d1d4d897b3affd2fd944fcff37f68)
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtexthtmlparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 2494fa472c..a6c9c1637e 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -321,7 +321,7 @@ static const struct QTextHtmlEntity { const char name[9]; char16_t code; } entit }; static_assert(MAX_ENTITY == sizeof entities / sizeof *entities); -#if defined(Q_CC_MSVC) && _MSC_VER < 1600 +#if defined(Q_CC_MSVC_ONLY) && _MSC_VER < 1600 bool operator<(const QTextHtmlEntity &entity1, const QTextHtmlEntity &entity2) { return QLatin1String(entity1.name) < QLatin1String(entity2.name); |