qt6-bb10/tests/auto/corelib/global
Tatiana Borisova eae3d0807a Convert a Qt ordering type to the weaker std ordering type
- Added missing conversion from Qt::strong_ordering to
std::weak_ordering, std::partial_ordering.
- Added missing conversion from Qt::weak_ordering to
std::partial_ordering.

Usage of Q_IMPLICIT specifier in new std::*_ordering conversion functions leads to following ambiguity errors on WIN + MSVC configuration:
C:/Users/qt/work/qt/qtbase/src/corelib/global/qcompare.h(334): error C2440:
'static_cast': cannot convert from 'Qt::weak_ordering' to 'Qt::partial_ordering'
qcompare.h(334): note: 'Qt::partial_ordering::partial_ordering': ambiguous call to overloaded function
qcompare.h(249): note: could be 'Qt::partial_ordering::partial_ordering(Qt::partial_ordering &&)'
qcompare.h(153): note: or 'Qt::partial_ordering::partial_ordering(std::partial_ordering) noexcept'
qcompare.h(334): note: while trying to match the argument list '(Qt::weak_ordering)'

For solving the problem we can exclude the conversion function from the argument list(make it explicit in case of MSVC).
Q_COMPARE_CAST_IMPLICIT is used for setting explicit or implicit specifier depending on the compiler type

[ChangeLog][QtCore][QtCompare] Added missing conversions
from Qt ordering types to std ordering types.

Fixes: QTBUG-127670
Pick-to: 6.7
Change-Id: I32a9a33fa8921c75b0e5a40bd413572f1bd6765a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 521e091bca1764d53ac06bb60707475d1032f5d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-25 17:04:38 +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 Convert a Qt ordering type to the weaker std ordering type 2024-08-25 17:04:38 +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 Fix QT_SUPPORTS_INT128 checks 2024-08-07 19:57:04 +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 ptests: Fix qlogging to use relative folder 2024-05-03 11:58:54 +03:00
qnativeinterface Change license for tests files 2024-02-04 09:56:42 +01:00
qnumeric Rename qt_saturate to q26::saturate_cast 2024-08-25 17:04: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