Replace QLatin1String with operator _L1
This commit is contained in:
@@ -95,6 +95,7 @@
|
||||
#include "ui_albumcovermanager.h"
|
||||
|
||||
using namespace std::literals::chrono_literals;
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
namespace {
|
||||
constexpr char kSettingsGroup[] = "CoverManager";
|
||||
@@ -289,10 +290,10 @@ void AlbumCoverManager::LoadGeometry() {
|
||||
|
||||
Settings s;
|
||||
s.beginGroup(kSettingsGroup);
|
||||
if (s.contains(QLatin1String("geometry"))) {
|
||||
if (s.contains("geometry"_L1)) {
|
||||
restoreGeometry(s.value("geometry").toByteArray());
|
||||
}
|
||||
if (s.contains(QLatin1String("splitter_state"))) {
|
||||
if (s.contains("splitter_state"_L1)) {
|
||||
ui_->splitter->restoreState(s.value("splitter_state").toByteArray());
|
||||
}
|
||||
else {
|
||||
@@ -402,7 +403,7 @@ void AlbumCoverManager::ArtistChanged(QListWidgetItem *current) {
|
||||
display_text = album_info.album;
|
||||
}
|
||||
else {
|
||||
display_text = album_info.album_artist + QLatin1String(" - ") + album_info.album;
|
||||
display_text = album_info.album_artist + " - "_L1 + album_info.album;
|
||||
}
|
||||
|
||||
AlbumItem *album_item = new AlbumItem(icon_nocover_item_, display_text, ui_->albums);
|
||||
@@ -418,7 +419,7 @@ void AlbumCoverManager::ArtistChanged(QListWidgetItem *current) {
|
||||
album_item->setToolTip(album_info.album);
|
||||
}
|
||||
else {
|
||||
album_item->setToolTip(album_info.album_artist + QLatin1String(" - ") + album_info.album);
|
||||
album_item->setToolTip(album_info.album_artist + " - "_L1 + album_info.album);
|
||||
}
|
||||
|
||||
album_item->setData(Role_ArtEmbedded, album_info.art_embedded);
|
||||
@@ -536,7 +537,7 @@ bool AlbumCoverManager::ShouldHide(const AlbumItem &album_item, const QString &f
|
||||
return false;
|
||||
}
|
||||
|
||||
const QStringList query = filter.split(QLatin1Char(' '));
|
||||
const QStringList query = filter.split(u' ');
|
||||
for (const QString &s : query) {
|
||||
bool in_text = album_item.text().contains(s, Qt::CaseInsensitive);
|
||||
bool in_albumartist = album_item.data(Role_AlbumArtist).toString().contains(s, Qt::CaseInsensitive);
|
||||
@@ -597,7 +598,7 @@ void AlbumCoverManager::UpdateStatusText() {
|
||||
.arg(fetch_statistics_.missing_images_);
|
||||
|
||||
if (fetch_statistics_.bytes_transferred_ > 0) {
|
||||
message += QLatin1String(", ") + tr("%1 transferred").arg(Utilities::PrettySize(fetch_statistics_.bytes_transferred_));
|
||||
message += ", "_L1 + tr("%1 transferred").arg(Utilities::PrettySize(fetch_statistics_.bytes_transferred_));
|
||||
}
|
||||
|
||||
statusBar()->showMessage(message);
|
||||
@@ -671,7 +672,7 @@ Song AlbumCoverManager::AlbumItemAsSong(AlbumItem *album_item) {
|
||||
QString title = album_item->data(Role_Album).toString();
|
||||
QString artist_name = album_item->data(Role_AlbumArtist).toString();
|
||||
if (!artist_name.isEmpty()) {
|
||||
result.set_title(artist_name + QLatin1String(" - ") + title);
|
||||
result.set_title(artist_name + " - "_L1 + title);
|
||||
}
|
||||
else {
|
||||
result.set_title(title);
|
||||
|
||||
Reference in New Issue
Block a user