Replace QLatin1String with QStringLiteral

This commit is contained in:
Jonas Kvinge 2024-06-12 23:51:09 +02:00
parent 7ba4fda346
commit 2f546f214d
3 changed files with 3 additions and 3 deletions

View File

@ -283,7 +283,7 @@ void DiscogsCoverProvider::HandleSearchReply(QNetworkReply *reply, const int id)
QString title = obj_result[QLatin1String("title")].toString(); QString title = obj_result[QLatin1String("title")].toString();
if (title.contains(QLatin1String(" - "))) { if (title.contains(QLatin1String(" - "))) {
QStringList title_splitted = title.split(QLatin1String(" - ")); QStringList title_splitted = title.split(QStringLiteral(" - "));
if (title_splitted.count() == 2) { if (title_splitted.count() == 2) {
QString artist = title_splitted.first(); QString artist = title_splitted.first();
title = title_splitted.last(); title = title_splitted.last();

View File

@ -1486,7 +1486,7 @@ void GstEnginePipeline::TagMessageReceived(GstMessage *msg) {
if (!engine_metadata.title.isEmpty() && engine_metadata.artist.isEmpty() && engine_metadata.album.isEmpty()) { if (!engine_metadata.title.isEmpty() && engine_metadata.artist.isEmpty() && engine_metadata.album.isEmpty()) {
QStringList title_splitted; QStringList title_splitted;
if (engine_metadata.title.contains(QLatin1String(" - "))) { if (engine_metadata.title.contains(QLatin1String(" - "))) {
title_splitted = engine_metadata.title.split(QLatin1String(" - ")); title_splitted = engine_metadata.title.split(QStringLiteral(" - "));
} }
else if (engine_metadata.title.contains(QLatin1Char('~'))) { else if (engine_metadata.title.contains(QLatin1Char('~'))) {
title_splitted = engine_metadata.title.split(QLatin1Char('~')); title_splitted = engine_metadata.title.split(QLatin1Char('~'));

View File

@ -112,7 +112,7 @@ bool M3UParser::ParseMetadata(const QString &line, M3UParser::Metadata *metadata
metadata->length = length * kNsecPerSec; metadata->length = length * kNsecPerSec;
QString track_info = info.section(QLatin1Char(','), 1); QString track_info = info.section(QLatin1Char(','), 1);
QStringList list = track_info.split(QLatin1String(" - ")); QStringList list = track_info.split(QStringLiteral(" - "));
if (list.size() <= 1) { if (list.size() <= 1) {
metadata->title = track_info; metadata->title = track_info;
return true; return true;