qt6-bb10/tests/auto/corelib/global
Giuseppe D'Angelo 4f234b02b7 QNumeric: add a private qUnsignedAbs
Checking qAbs preconditions reveals that several places into Qt are
calling it with minimal values, causing UB. Those places do not actually
need that the absolute value is of the same type as the parameter.
Therefore, introduce qUnsignedAbs, which is like qAbs() but whose return
type is always unsigned, and therefore can accept everything.

This function is private; I don't want to encourage users to rely on our
extension.

Aggressively cherry picking because this will be needed in subsequent
bugfixes.

Change-Id: I2047768a5fd35f12bf898ca8c2008813434edd8d
Pick-to: 6.5 6.2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 83c812e1322a2b004bc604be3e6f61fb83246eb0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ad867197cf02043f9ec67363b020ac08405b0ab1)
2025-01-29 13:33:32 +00:00
..
q20 Add copyright and licensing to build system files missing it 2024-05-21 17:23:21 +02:00
q_func_info Change license for tests files 2024-02-04 09:56:42 +01:00
qcompare Revert "Convert a Qt ordering type to the weaker std ordering type" 2024-09-02 18:10:39 +00:00
qcomparehelpers Qt::totally_ordered_wrapper: do not allow operator*() for void* 2024-08-13 12:56:19 +00:00
qflags Change license for tests files 2024-02-04 09:56:42 +01:00
qfloat16 Tests: suppress has_denorm deprecation 2024-09-06 14:38:21 +00:00
qgetputenv Change license for tests files 2024-02-04 09:56:42 +01:00
qglobal Only define QT_SUPPORTS_INT128 if type_traits work for them 2024-08-16 17:34:29 +00:00
qglobalstatic Change license for tests files 2024-02-04 09:56:42 +01:00
qhooks Change license for tests files 2024-02-04 09:56:42 +01:00
qkeycombination QKeyCombination: move the operators into namespace Qt 2024-07-31 15:21:36 +00:00
qlibraryinfo qt.conf: add private "merge_qt_conf" option 2024-05-28 20:19:14 +02:00
qlogging Android: Fix logging of the category 2024-11-26 20:37:15 +00:00
qnativeinterface Change license for tests files 2024-02-04 09:56:42 +01:00
qnumeric QNumeric: add a private qUnsignedAbs 2025-01-29 13:33:32 +00:00
qoperatingsystemversion Fix build of tst_qoperatingsystemversion.cpp with C++20 2024-03-19 21:09:38 +01:00
qrandomgenerator Change license for tests files 2024-02-04 09:56:42 +01:00
qtendian Fix QT_SUPPORTS_INT128 checks 2024-08-07 19:57:04 +00:00
qxp Add copyright and licensing to build system files missing it 2024-05-21 17:23:21 +02:00
CMakeLists.txt tst_QCompareHelpers: port to QTEST_THROW_ON_FAIL 2024-06-17 23:17:50 +00:00