Use Qt::Literals::StringLiterals

This commit is contained in:
Jonas Kvinge
2024-10-18 20:17:23 +02:00
parent 6931538ebf
commit 0e330b81db
156 changed files with 160 additions and 172 deletions

View File

@@ -49,7 +49,7 @@
#include "acoustidclient.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
namespace {
constexpr char kClientId[] = "0qjUoxbowg";

View File

@@ -50,7 +50,7 @@
#include "utilities/xmlutils.h"
#include "musicbrainzclient.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
namespace {
constexpr char kTrackUrl[] = "https://musicbrainz.org/ws/2/recording/";

View File

@@ -35,8 +35,6 @@
#include "core/shared_ptr.h"
using namespace Qt::Literals::StringLiterals;
class QNetworkReply;
class QTimer;
class QXmlStreamReader;
@@ -154,16 +152,16 @@ class MusicBrainzClient : public QObject {
}
void SetStatusFromString(const QString &s) {
if (s.compare("Official"_L1, Qt::CaseInsensitive) == 0) {
if (s.compare(QLatin1String("Official"), Qt::CaseInsensitive) == 0) {
status_ = Status::Official;
}
else if (s.compare("Promotion"_L1, Qt::CaseInsensitive) == 0) {
else if (s.compare(QLatin1String("Promotion"), Qt::CaseInsensitive) == 0) {
status_ = Status::Promotional;
}
else if (s.compare("Bootleg"_L1, Qt::CaseInsensitive) == 0) {
else if (s.compare(QLatin1String("Bootleg"), Qt::CaseInsensitive) == 0) {
status_ = Status::Bootleg;
}
else if (s.compare("Pseudo-release"_L1, Qt::CaseInsensitive) == 0) {
else if (s.compare(QLatin1String("Pseudo-release"), Qt::CaseInsensitive) == 0) {
status_ = Status::PseudoRelease;
}
else {