From a36bf2df651ffb7b8785eacf476105b35f83b32f Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 12 Jun 2024 18:08:54 +0200 Subject: [PATCH] Replace QStringLiteral with QLatin1String --- src/collection/collectionmodel.cpp | 14 ++++---------- src/core/database.cpp | 2 +- src/playlistparsers/cueparser.cpp | 2 +- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/collection/collectionmodel.cpp b/src/collection/collectionmodel.cpp index dc5f9ad29..40f1de599 100644 --- a/src/collection/collectionmodel.cpp +++ b/src/collection/collectionmodel.cpp @@ -1358,31 +1358,25 @@ QString CollectionModel::DividerDisplayText(const GroupBy group_by, const QStrin case GroupBy::Genre: case GroupBy::FileType: case GroupBy::Format: - if (key == QStringLiteral("0")) return QStringLiteral("0-9"); + if (key == QLatin1String("0")) return QStringLiteral("0-9"); return key.toUpper(); case GroupBy::YearAlbum: case GroupBy::YearAlbumDisc: case GroupBy::OriginalYearAlbum: case GroupBy::OriginalYearAlbumDisc: - if (key == QStringLiteral("0000")) return tr("Unknown"); + if (key == QLatin1String("0000")) return tr("Unknown"); return key.toUpper(); case GroupBy::Year: case GroupBy::OriginalYear: - if (key == QStringLiteral("0000")) return tr("Unknown"); + if (key == QLatin1String("0000")) return tr("Unknown"); return QString::number(key.toInt()); // To remove leading 0s case GroupBy::Samplerate: - if (key == QStringLiteral("000")) return tr("Unknown"); - return QString::number(key.toInt()); // To remove leading 0s - case GroupBy::Bitdepth: - if (key == QStringLiteral("000")) return tr("Unknown"); - return QString::number(key.toInt()); // To remove leading 0s - case GroupBy::Bitrate: - if (key == QStringLiteral("000")) return tr("Unknown"); + if (key == QLatin1String("000")) return tr("Unknown"); return QString::number(key.toInt()); // To remove leading 0s case GroupBy::None: diff --git a/src/core/database.cpp b/src/core/database.cpp index ecfc42dc8..7bac147d6 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -502,7 +502,7 @@ bool Database::IntegrityCheck(const QSqlDatabase &db) { QString message = q.value(0).toString(); // If no errors are found, a single row with the value "ok" is returned - if (message == QStringLiteral("ok")) { + if (message == QLatin1String("ok")) { ok = true; break; } diff --git a/src/playlistparsers/cueparser.cpp b/src/playlistparsers/cueparser.cpp index f624ce2a4..e5c7bedc9 100644 --- a/src/playlistparsers/cueparser.cpp +++ b/src/playlistparsers/cueparser.cpp @@ -218,7 +218,7 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const if (!line_additional.isEmpty()) { // If there's none "01" index, we'll just take the first one also, we'll take the "01" index even if it's the last one - if (line_value == QStringLiteral("01") || index.isEmpty()) { + if (line_value == QLatin1String("01") || index.isEmpty()) { index = line_additional; }