2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Instantiate QRegularExpression instances statically

This commit is contained in:
Ilya Fedin
2023-12-22 03:50:04 +04:00
committed by John Preston
parent 4b297bfa09
commit e6b9a07163
18 changed files with 74 additions and 47 deletions

View File

@@ -579,8 +579,9 @@ void writeAutoupdatePrefix(const QString &prefix) {
QString readAutoupdatePrefix() {
Expects(!Core::UpdaterDisabled());
static const auto RegExp = QRegularExpression("/+$");
auto result = readAutoupdatePrefixRaw();
return result.replace(QRegularExpression("/+$"), QString());
return result.replace(RegExp, QString());
}
void writeBackground(const Data::WallPaper &paper, const QImage &image) {