Use QStringLiteral

This commit is contained in:
Jonas Kvinge
2024-04-09 23:20:26 +02:00
parent 3cfffa5fbb
commit 58944993b8
233 changed files with 3885 additions and 3885 deletions

View File

@@ -33,7 +33,7 @@ const char SongLyricsComLyricsProvider::kEndTag[] = "<\\/p>";
const char SongLyricsComLyricsProvider::kLyricsStart[] = "<p id=\"songLyricsDiv\"[^>]+>";
SongLyricsComLyricsProvider::SongLyricsComLyricsProvider(SharedPtr<NetworkAccessManager> network, QObject *parent)
: HtmlLyricsProvider("songlyrics.com", true, kStartTag, kEndTag, kLyricsStart, false, network, parent) {}
: HtmlLyricsProvider(QStringLiteral("songlyrics.com"), true, kStartTag, kEndTag, kLyricsStart, false, network, parent) {}
QUrl SongLyricsComLyricsProvider::Url(const LyricsSearchRequest &request) {
@@ -45,11 +45,11 @@ QString SongLyricsComLyricsProvider::StringFixup(QString text) {
return text.replace('/', '-')
.replace('\'', '-')
.remove(QRegularExpression("[^\\w0-9\\- ]"))
.replace(QRegularExpression(" {2,}"), " ")
.remove(QRegularExpression(QStringLiteral("[^\\w0-9\\- ]")))
.replace(QRegularExpression(QStringLiteral(" {2,}")), QStringLiteral(" "))
.simplified()
.replace(' ', '-')
.replace(QRegularExpression("(-)\\1+"), "-")
.replace(QRegularExpression(QStringLiteral("(-)\\1+")), QStringLiteral("-"))
.toLower();
}