Replace QLatin1String with QStringLiteral

This commit is contained in:
Jonas Kvinge 2024-08-25 01:08:25 +02:00
parent 8da616491d
commit 3f3059c98b
4 changed files with 23 additions and 23 deletions

View File

@ -400,7 +400,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
ui_->tabs->AddTab(tidal_view_, QStringLiteral("tidal"), IconLoader::Load(QStringLiteral("tidal"), true, 0, 32), tr("Tidal"));
#endif
#ifdef HAVE_SPOTIFY
ui_->tabs->AddTab(spotify_view_, QLatin1String("spotify"), IconLoader::Load(QStringLiteral("spotify"), true, 0, 32), tr("Spotify"));
ui_->tabs->AddTab(spotify_view_, QStringLiteral("spotify"), IconLoader::Load(QStringLiteral("spotify"), true, 0, 32), tr("Spotify"));
#endif
#ifdef HAVE_QOBUZ
ui_->tabs->AddTab(qobuz_view_, QStringLiteral("qobuz"), IconLoader::Load(QStringLiteral("qobuz"), true, 0, 32), tr("Qobuz"));

View File

@ -1935,7 +1935,7 @@ void Song::MergeUserSetData(const Song &other, const bool merge_playcount, const
}
QString Song::AlbumKey() const {
return QStringLiteral("%1|%2|%3").arg(is_compilation() ? QLatin1String("_compilation") : effective_albumartist(), has_cue() ? cue_path() : QLatin1String(""), effective_album());
return QStringLiteral("%1|%2|%3").arg(is_compilation() ? QStringLiteral("_compilation") : effective_albumartist(), has_cue() ? cue_path() : QLatin1String(""), effective_album());
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)

View File

@ -93,26 +93,26 @@ void StyleSheetLoader::UpdateStyleSheet(QWidget *widget, SharedPtr<StyleSheetDat
stylesheet.replace(QLatin1String("%palette-alternate-base"), QStringLiteral("rgba(%1,%2,%3,%4)").arg(alt.red()).arg(alt.green()).arg(alt.blue()).arg(alt.alpha()));
}
ReplaceColor(&stylesheet, QLatin1String("Window"), p, QPalette::Window);
ReplaceColor(&stylesheet, QLatin1String("Background"), p, QPalette::Window);
ReplaceColor(&stylesheet, QLatin1String("WindowText"), p, QPalette::WindowText);
ReplaceColor(&stylesheet, QLatin1String("Base"), p, QPalette::Base);
ReplaceColor(&stylesheet, QLatin1String("AlternateBase"), p, QPalette::AlternateBase);
ReplaceColor(&stylesheet, QLatin1String("ToolTipBase"), p, QPalette::ToolTipBase);
ReplaceColor(&stylesheet, QLatin1String("ToolTipText"), p, QPalette::ToolTipText);
ReplaceColor(&stylesheet, QLatin1String("Text"), p, QPalette::Text);
ReplaceColor(&stylesheet, QLatin1String("Button"), p, QPalette::Button);
ReplaceColor(&stylesheet, QLatin1String("ButtonText"), p, QPalette::ButtonText);
ReplaceColor(&stylesheet, QLatin1String("BrightText"), p, QPalette::BrightText);
ReplaceColor(&stylesheet, QLatin1String("Light"), p, QPalette::Light);
ReplaceColor(&stylesheet, QLatin1String("Midlight"), p, QPalette::Midlight);
ReplaceColor(&stylesheet, QLatin1String("Dark"), p, QPalette::Dark);
ReplaceColor(&stylesheet, QLatin1String("Mid"), p, QPalette::Mid);
ReplaceColor(&stylesheet, QLatin1String("Shadow"), p, QPalette::Shadow);
ReplaceColor(&stylesheet, QLatin1String("Highlight"), p, QPalette::Highlight);
ReplaceColor(&stylesheet, QLatin1String("HighlightedText"), p, QPalette::HighlightedText);
ReplaceColor(&stylesheet, QLatin1String("Link"), p, QPalette::Link);
ReplaceColor(&stylesheet, QLatin1String("LinkVisited"), p, QPalette::LinkVisited);
ReplaceColor(&stylesheet, QStringLiteral("Window"), p, QPalette::Window);
ReplaceColor(&stylesheet, QStringLiteral("Background"), p, QPalette::Window);
ReplaceColor(&stylesheet, QStringLiteral("WindowText"), p, QPalette::WindowText);
ReplaceColor(&stylesheet, QStringLiteral("Base"), p, QPalette::Base);
ReplaceColor(&stylesheet, QStringLiteral("AlternateBase"), p, QPalette::AlternateBase);
ReplaceColor(&stylesheet, QStringLiteral("ToolTipBase"), p, QPalette::ToolTipBase);
ReplaceColor(&stylesheet, QStringLiteral("ToolTipText"), p, QPalette::ToolTipText);
ReplaceColor(&stylesheet, QStringLiteral("Text"), p, QPalette::Text);
ReplaceColor(&stylesheet, QStringLiteral("Button"), p, QPalette::Button);
ReplaceColor(&stylesheet, QStringLiteral("ButtonText"), p, QPalette::ButtonText);
ReplaceColor(&stylesheet, QStringLiteral("BrightText"), p, QPalette::BrightText);
ReplaceColor(&stylesheet, QStringLiteral("Light"), p, QPalette::Light);
ReplaceColor(&stylesheet, QStringLiteral("Midlight"), p, QPalette::Midlight);
ReplaceColor(&stylesheet, QStringLiteral("Dark"), p, QPalette::Dark);
ReplaceColor(&stylesheet, QStringLiteral("Mid"), p, QPalette::Mid);
ReplaceColor(&stylesheet, QStringLiteral("Shadow"), p, QPalette::Shadow);
ReplaceColor(&stylesheet, QStringLiteral("Highlight"), p, QPalette::Highlight);
ReplaceColor(&stylesheet, QStringLiteral("HighlightedText"), p, QPalette::HighlightedText);
ReplaceColor(&stylesheet, QStringLiteral("Link"), p, QPalette::Link);
ReplaceColor(&stylesheet, QStringLiteral("LinkVisited"), p, QPalette::LinkVisited);
#ifdef Q_OS_MACOS
stylesheet.replace(QLatin1String("macos"), QLatin1String("*"));

View File

@ -662,7 +662,7 @@ QUrl AlbumCoverChoiceController::SaveCoverToFileAutomatic(const Song::Source sou
const AlbumCoverImageResult &result,
const bool force_overwrite) {
QString filepath = CoverUtils::CoverFilePath(cover_options_, source, artist, album, album_id, album_dir, result.cover_url, QLatin1String("jpg"));
QString filepath = CoverUtils::CoverFilePath(cover_options_, source, artist, album, album_id, album_dir, result.cover_url, QStringLiteral("jpg"));
if (filepath.isEmpty()) return QUrl();
QFile file(filepath);