Character: Don't create QChar out of bounds.

An assert was added for this in Qt 6 [1].

[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=915be6606ead25f4fbbbcb2687b33cf22a955177
This commit is contained in:
Kai Uwe Broulik
2023-07-04 20:06:57 +02:00
parent 15847d84fa
commit 985fe275a7

View File

@@ -207,6 +207,9 @@ public:
{
if (rendition.f.extended) {
return false;
// QChar(uint) asserts this.
} else if (character > 0xffff) {
return false;
} else {
return QChar(character).isSpace();
}