diff options
| author | Tatiana Borisova <tatiana.borisova@qt.io> | 2024-08-05 19:01:34 +0200 |
|---|---|---|
| committer | Tatiana Borisova <tatiana.borisova@qt.io> | 2024-08-23 16:44:36 +0200 |
| commit | 521e091bca1764d53ac06bb60707475d1032f5d5 (patch) | |
| tree | 7001d979524b2e61737c2b25d9f20b523bcffc8f /src/sql/doc/snippets/sqldatabase/sqldatabase.cpp | |
| parent | f8e7dfe93ab9622f77aade23707cd6f0b9386379 (diff) | |
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.8 6.7
Change-Id: I32a9a33fa8921c75b0e5a40bd413572f1bd6765a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/sql/doc/snippets/sqldatabase/sqldatabase.cpp')
0 files changed, 0 insertions, 0 deletions
