Replace QStringLiteral with QLatin1String

This commit is contained in:
Jonas Kvinge
2024-06-12 20:30:36 +02:00
parent 20595a11bc
commit 5451c110b1
64 changed files with 367 additions and 366 deletions

View File

@@ -177,7 +177,7 @@ void RadioModel::AddChannels(const RadioChannelList &channels) {
RadioItem *item = new RadioItem(RadioItem::Type::Channel, container);
item->source = channel.source;
item->display_text = channel.name;
item->sort_text = SortText(Song::TextForSource(channel.source) + QStringLiteral(" - ") + channel.name);
item->sort_text = SortText(Song::TextForSource(channel.source) + QLatin1String(" - ") + channel.name);
item->channel = channel;
items_ << item;
endInsertRows();
@@ -325,7 +325,7 @@ void RadioModel::AlbumCoverLoaded(const quint64 id, const AlbumCoverLoaderResult
QString RadioModel::SortText(QString text) {
if (text.isEmpty()) {
text = QStringLiteral(" unknown");
text = QLatin1String(" unknown");
}
else {
text = text.toLower();

View File

@@ -110,11 +110,11 @@ void RadioParadiseService::GetChannelsReply(QNetworkReply *reply, const int task
QString label = obj_stream[QLatin1String("label")].toString();
QString url = obj_stream[QLatin1String("url")].toString();
if (!url.contains(QRegularExpression(QStringLiteral("^[0-9a-zA-Z]*:\\/\\/"), QRegularExpression::CaseInsensitiveOption))) {
url.prepend(QStringLiteral("https://"));
url.prepend(QLatin1String("https://"));
}
RadioChannel channel;
channel.source = source_;
channel.name = name + QStringLiteral(" - ") + label;
channel.name = name + QLatin1String(" - ") + label;
channel.url.setUrl(url);
channels << channel;
}

View File

@@ -112,7 +112,7 @@ void SomaFMService::GetChannelsReply(QNetworkReply *reply, const int task_id) {
}
RadioChannel channel;
QString quality = obj_playlist[QLatin1String("quality")].toString();
if (quality != QStringLiteral("highest")) continue;
if (quality != QLatin1String("highest")) continue;
channel.source = source_;
channel.name = name;
channel.url.setUrl(obj_playlist[QLatin1String("url")].toString());