Use static QRegularExpression

This commit is contained in:
Jonas Kvinge
2024-08-24 17:23:10 +02:00
parent a2cae06582
commit bc667a6474
31 changed files with 121 additions and 67 deletions

View File

@@ -315,7 +315,8 @@ void MusixmatchLyricsProvider::HandleLyricsReply(QNetworkReply *reply, LyricsSea
return;
}
if (content_json.contains(QRegularExpression(QStringLiteral("<[^>]*>")))) { // Make sure it's not HTML code.
static const QRegularExpression regex_html_tag(QStringLiteral("<[^>]*>"));
if (content_json.contains(regex_html_tag)) { // Make sure it's not HTML code.
EndSearch(search, url);
return;
}