diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2024-09-30 17:27:06 +0200 |
|---|---|---|
| committer | Ahmad Samir <a.samirh78@gmail.com> | 2024-10-10 22:31:37 +0300 |
| commit | 9ef4c123c39c642357c9e8530d59f32f220a7824 (patch) | |
| tree | df2eab7e1b48257bed01b068dad9b12c880f647e /src/gui/platform/unix/qgenericunixservices.cpp | |
| parent | 4f5b48d4c69527e5f2450694219432e84b2af6df (diff) | |
QChar: disable implicit conversions on most ctor arguments
The QChar ctor overload set is a mess, as it allows implicit
conversions from other types. E.g. char32_t is using one of the
int/uint overloads. Ditto wchar_t on Unix.
Disallow implicit conversions by making all¹ ctors templates and
constraining them on just the types we want.
¹ except the (uchar, uchar) one
This also removes the need to maintain the SFINAE-unfriendly =delete'd
char/uchar ctors in QT_NO_CAST_FROM_ASCII builds.
Needed to fix a few QChar(Qt::Key) users in Apple code.
[ChangeLog][QtCore][Potentially Source-Incompatible Changes] QChar
constructors no longer perform implicit conversions. They only accept
the exact types listed in the documentation. A backwards-compatible
fix is to explicitly cast to one of the explicitly-supported argument
types.
[ChangeLog][QtCore][QChar] The constructors no longer perform implicit
conversions. They only accept the exact types listed in the
documentation. A backwards-compatible fix is to cast to one of the
explicitly-supported argument types.
Change-Id: I5db96948b4724e96c6a0ede9a8ff5cae3bfa3280
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/platform/unix/qgenericunixservices.cpp')
0 files changed, 0 insertions, 0 deletions
