diff options
author | Liang Qi <liang.qi@qt.io> | 2019-01-04 07:31:22 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-01-04 07:33:14 +0100 |
commit | 03039979b5a643f9def38a73e19835bb69384202 (patch) | |
tree | e8a9184d5963128f013247ac64ec768d1cbf6911 /src/corelib/global | |
parent | 9682d217e21a2e88b6de799d79b843bbe0039df1 (diff) | |
parent | 4dc2bc323c985bdceb27f096dd6c8e7af657bb6b (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Also blacklist tst_QRawFont::unsupportedWritingSystem() and
tst_QGlyphRun::mixedScripts() on windows for now.
Conflicts:
qmake/generators/makefile.cpp
src/corelib/itemmodels/qstringlistmodel.cpp
src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h
tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
tests/auto/gui/text/qglyphrun/BLACKLIST
tests/auto/gui/text/qrawfont/BLACKLIST
Task-number: QTBUG-72836
Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/archdetect.cpp | 2 | ||||
-rw-r--r-- | src/corelib/global/qfloat16.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qnumeric_p.h | 16 |
3 files changed, 15 insertions, 5 deletions
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp index 422df3ff90..66a5e074f6 100644 --- a/src/corelib/global/archdetect.cpp +++ b/src/corelib/global/archdetect.cpp @@ -4,7 +4,7 @@ ** Copyright (C) 2016 Intel Corporation. ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the FOO module of the Qt Toolkit. +** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h index 766ab319a4..42cb1357f1 100644 --- a/src/corelib/global/qfloat16.h +++ b/src/corelib/global/qfloat16.h @@ -121,6 +121,7 @@ Q_REQUIRED_RESULT inline bool qIsNull(qfloat16 f) Q_DECL_NOTHROW inline int qIntCast(qfloat16 f) Q_DECL_NOTHROW { return int(static_cast<float>(f)); } +#ifndef Q_QDOC QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG("-Wc99-extensions") QT_WARNING_DISABLE_GCC("-Wold-style-cast") @@ -160,6 +161,7 @@ inline qfloat16::operator float() const Q_DECL_NOTHROW return f; #endif } +#endif inline qfloat16 operator-(qfloat16 a) Q_DECL_NOTHROW { diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h index 5326d9485b..c762da80d3 100644 --- a/src/corelib/global/qnumeric_p.h +++ b/src/corelib/global/qnumeric_p.h @@ -231,7 +231,7 @@ QT_WARNING_POP // size_t. Implementations for 8- and 16-bit types will work but may not be as // efficient. Implementations for 64-bit may be missing on 32-bit platforms. -#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) || (defined(Q_CC_INTEL) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflowx) +#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) || (defined(Q_CC_INTEL) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflow) // GCC 5, ICC 18, and Clang 3.8 have builtins to detect overflows template <typename T> inline @@ -373,10 +373,18 @@ template <> inline bool add_overflow(unsigned v1, unsigned v2, unsigned *r) // 32-bit mul_overflow is fine with the generic code above -# if defined(Q_PROCESSOR_X86_64) template <> inline bool add_overflow(quint64 v1, quint64 v2, quint64 *r) -{ return _addcarry_u64(0, v1, v2, reinterpret_cast<unsigned __int64 *>(r)); } -# endif // x86-64 +{ +# if defined(Q_PROCESSOR_X86_64) + return _addcarry_u64(0, v1, v2, reinterpret_cast<unsigned __int64 *>(r)); +# else + uint low, high; + uchar carry = _addcarry_u32(0, unsigned(v1), unsigned(v2), &low); + carry = _addcarry_u32(carry, v1 >> 32, v2 >> 32, &high); + *r = (quint64(high) << 32) | low; + return carry; +# endif // !x86-64 +} # endif // MSVC X86 #endif // !GCC } |