mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
restore QChar::isLetterOrNumber() and QChar::isSpace() behaviour to that prior to fa34c080f6
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
805b9678d4
commit
96899c184d
1 changed files with 25 additions and 1 deletions
|
@ -612,6 +612,16 @@ bool QChar::isSpace() const
|
|||
{
|
||||
if(ucs >= 9 && ucs <= 13)
|
||||
return true;
|
||||
const int8_t category = u_charType(ucs);
|
||||
switch (category) {
|
||||
case U_SPACE_SEPARATOR:
|
||||
case U_LINE_SEPARATOR:
|
||||
case U_PARAGRAPH_SEPARATOR:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
// special characters check
|
||||
return u_isblank(ucs);
|
||||
}
|
||||
|
||||
|
@ -676,7 +686,21 @@ bool QChar::isLetterOrNumber() const
|
|||
if (is_ascii_char(ucs)) {
|
||||
return is_ascii_letterornumber(ucs);
|
||||
}
|
||||
return u_isalnum(ucs);
|
||||
const int8_t category = u_charType(ucs);
|
||||
switch (category) {
|
||||
case U_UPPERCASE_LETTER:
|
||||
case U_LOWERCASE_LETTER:
|
||||
case U_TITLECASE_LETTER:
|
||||
case U_MODIFIER_LETTER:
|
||||
case U_OTHER_LETTER:
|
||||
case U_DECIMAL_DIGIT_NUMBER:
|
||||
case U_LETTER_NUMBER:
|
||||
case U_OTHER_NUMBER:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue