Port to QStringLiteral operator

This commit is contained in:
Jonas Kvinge
2024-10-20 06:38:55 +02:00
parent 722035913e
commit ef9ef63f02
202 changed files with 2036 additions and 1889 deletions

View File

@@ -44,7 +44,7 @@ namespace {
constexpr char kUrlSearch[] = "http://api.lololyrics.com/0.5/getLyric";
}
LoloLyricsProvider::LoloLyricsProvider(SharedPtr<NetworkAccessManager> network, QObject *parent) : LyricsProvider(QStringLiteral("LoloLyrics"), true, false, network, parent) {}
LoloLyricsProvider::LoloLyricsProvider(SharedPtr<NetworkAccessManager> network, QObject *parent) : LyricsProvider(u"LoloLyrics"_s, true, false, network, parent) {}
LoloLyricsProvider::~LoloLyricsProvider() {
@@ -62,8 +62,8 @@ void LoloLyricsProvider::StartSearch(const int id, const LyricsSearchRequest &re
Q_ASSERT(QThread::currentThread() != qApp->thread());
QUrlQuery url_query;
url_query.addQueryItem(QStringLiteral("artist"), QString::fromLatin1(QUrl::toPercentEncoding(request.artist)));
url_query.addQueryItem(QStringLiteral("track"), QString::fromLatin1(QUrl::toPercentEncoding(request.title)));
url_query.addQueryItem(u"artist"_s, QString::fromLatin1(QUrl::toPercentEncoding(request.artist)));
url_query.addQueryItem(u"track"_s, QString::fromLatin1(QUrl::toPercentEncoding(request.title)));
QUrl url(QString::fromLatin1(kUrlSearch));
url.setQuery(url_query);