Skip to content

Commit

Permalink
Fix ASCII regex for older Qt versions
Browse files Browse the repository at this point in the history
  • Loading branch information
varjolintu committed Feb 21, 2024
1 parent aa10d89 commit e610466
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ namespace Tools

bool isAsciiString(const QString& str)
{
constexpr auto pattern = R"(^[\p{ASCII}]+$)";
constexpr auto pattern = R"(^[\x00-\x7F]+$)";
QRegularExpression regexp(pattern, QRegularExpression::CaseInsensitiveOption);
return regexp.match(str).hasMatch();
}
Expand Down

0 comments on commit e610466

Please sign in to comment.