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

@@ -38,7 +38,7 @@
const char *OVHLyricsProvider::kUrlSearch = "https://api.lyrics.ovh/v1/";
OVHLyricsProvider::OVHLyricsProvider(SharedPtr<NetworkAccessManager> network, QObject *parent) : JsonLyricsProvider("Lyrics.ovh", true, false, network, parent) {}
OVHLyricsProvider::OVHLyricsProvider(SharedPtr<NetworkAccessManager> network, QObject *parent) : JsonLyricsProvider(QStringLiteral("Lyrics.ovh"), true, false, network, parent) {}
OVHLyricsProvider::~OVHLyricsProvider() {
@@ -79,20 +79,20 @@ void OVHLyricsProvider::HandleSearchReply(QNetworkReply *reply, const int id, co
return;
}
if (json_obj.contains("error")) {
Error(json_obj["error"].toString());
if (json_obj.contains(QStringLiteral("error"))) {
Error(json_obj[QStringLiteral("error")].toString());
qLog(Debug) << "OVHLyrics: No lyrics for" << request.artist << request.title;
emit SearchFinished(id);
return;
}
if (!json_obj.contains("lyrics")) {
if (!json_obj.contains(QStringLiteral("lyrics"))) {
emit SearchFinished(id);
return;
}
LyricsSearchResult result;
result.lyrics = json_obj["lyrics"].toString();
result.lyrics = json_obj[QStringLiteral("lyrics")].toString();
if (result.lyrics.isEmpty()) {
qLog(Debug) << "OVHLyrics: No lyrics for" << request.artist << request.title;