chore: make all the regexes static const (#3647)

This commit is contained in:
Alexandru Ionut Tripon 2025-04-29 00:33:49 +03:00 committed by GitHub
commit a6006c3a33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 87 additions and 84 deletions

View file

@ -72,7 +72,8 @@ ApplicationId ApplicationId::fromTraditionalApp()
protoId = protoId.toLower();
#endif
auto prefix = protoId.section(QLatin1Char('/'), -1);
prefix.remove(QRegularExpression("[^a-zA-Z]"));
static const QRegularExpression s_removeChars("[^a-zA-Z]");
prefix.remove(s_removeChars);
prefix.truncate(6);
QByteArray idc = protoId.toUtf8();
quint16 idNum = qChecksum(idc);