diff options
author | Kai Koehne <kai.koehne@qt.io> | 2020-11-21 16:40:20 +0000 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2020-11-21 18:24:16 +0000 |
commit | 64319ae45ebbd1bfb3fb741756c924e445516ac7 (patch) | |
tree | 0bfef4d71b12ffdafc5aeace4c2feb87e16dc89b | |
parent | edef70185c8a46fea205b781828058c7c0e03326 (diff) | |
download | qtbase-64319ae45ebbd1bfb3fb741756c924e445516ac7.tar.gz |
Revert "QChar: assert on illegal construction"
This reverts commit 915be6606ead25f4fbbbcb2687b33cf22a955177.
Reason for revert: This causes issues in other modules,
see QTBUG-88687, QTBUG-88710, QTBUG-88712. We should fix them,
but let's not block 6.0.0 until then.
Task-number: QTBUG-88687
Task-number: QTBUG-88710
Task-number: QTBUG-88712
Change-Id: I89425082c9c55aabb34283dfec5dfd421d91d269
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | src/corelib/text/qchar.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qchar.h b/src/corelib/text/qchar.h index 32ecfa0e48..04aeed8678 100644 --- a/src/corelib/text/qchar.h +++ b/src/corelib/text/qchar.h @@ -111,8 +111,8 @@ public: constexpr Q_IMPLICIT QChar(ushort rc) noexcept : ucs(rc) {} constexpr QCHAR_MAYBE_IMPLICIT QChar(uchar c, uchar r) noexcept : ucs(char16_t((r << 8) | c)) {} constexpr Q_IMPLICIT QChar(short rc) noexcept : ucs(char16_t(rc)) {} - constexpr QCHAR_MAYBE_IMPLICIT QChar(uint rc) noexcept : ucs((Q_ASSERT(rc <= 0xffff), char16_t(rc))) {} - constexpr QCHAR_MAYBE_IMPLICIT QChar(int rc) noexcept : QChar(uint(rc)) {} + constexpr QCHAR_MAYBE_IMPLICIT QChar(uint rc) noexcept : ucs(char16_t(rc & 0xffff)) {} + constexpr QCHAR_MAYBE_IMPLICIT QChar(int rc) noexcept : ucs(char16_t(rc & 0xffff)) {} constexpr Q_IMPLICIT QChar(SpecialCharacter s) noexcept : ucs(char16_t(s)) {} constexpr Q_IMPLICIT QChar(QLatin1Char ch) noexcept : ucs(ch.unicode()) {} constexpr Q_IMPLICIT QChar(char16_t ch) noexcept : ucs(ch) {} |