QMetaType: allow converting to/from QChar and char16_t
Converting from char16_t to QString was already possible, going through a QChar. Change-Id: Ie28eadac333c4bcd8c08fffd17c5a41488ea5ba6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
4e11f40c1a
commit
17c964c4e8
@ -1173,6 +1173,9 @@ static constexpr struct : QMetaTypeModuleHelper
|
||||
QMETATYPE_CONVERTER_ASSIGN_QCHAR(ULong);
|
||||
QMETATYPE_CONVERTER_ASSIGN_QCHAR(UInt);
|
||||
QMETATYPE_CONVERTER_ASSIGN_QCHAR(ULongLong);
|
||||
QMETATYPE_CONVERTER_ASSIGN_QCHAR(Char16);
|
||||
|
||||
QMETATYPE_CONVERTER(Char16, QChar, result = source.unicode(); return true;)
|
||||
|
||||
// conversions to QString
|
||||
QMETATYPE_CONVERTER_ASSIGN(QString, QChar);
|
||||
|
Loading…
x
Reference in New Issue
Block a user