Port to QStringLiteral operator
This commit is contained in:
@@ -45,50 +45,50 @@ About::About(QWidget *parent) : QDialog(parent), ui_{} {
|
||||
setWindowTitle(tr("About Strawberry"));
|
||||
|
||||
strawberry_authors_ \
|
||||
<< Person(QStringLiteral("Jonas Kvinge"));
|
||||
<< Person(u"Jonas Kvinge"_s);
|
||||
|
||||
strawberry_contributors_ \
|
||||
<< Person(QStringLiteral("Gavin D. Howard"))
|
||||
<< Person(QStringLiteral("Martin Delille"))
|
||||
<< Person(QStringLiteral("Roman Lebedev"))
|
||||
<< Person(QStringLiteral("Daniel Ostertag"))
|
||||
<< Person(QStringLiteral("Gustavo L Conte"));
|
||||
<< Person(u"Gavin D. Howard"_s)
|
||||
<< Person(u"Martin Delille"_s)
|
||||
<< Person(u"Roman Lebedev"_s)
|
||||
<< Person(u"Daniel Ostertag"_s)
|
||||
<< Person(u"Gustavo L Conte"_s);
|
||||
|
||||
clementine_authors_
|
||||
<< Person(QStringLiteral("David Sansome"))
|
||||
<< Person(QStringLiteral("John Maguire"))
|
||||
<< Person(QStringLiteral("Paweł Bara"))
|
||||
<< Person(QStringLiteral("Arnaud Bienner"));
|
||||
<< Person(u"David Sansome"_s)
|
||||
<< Person(u"John Maguire"_s)
|
||||
<< Person(u"Paweł Bara"_s)
|
||||
<< Person(u"Arnaud Bienner"_s);
|
||||
|
||||
clementine_contributors_ \
|
||||
<< Person(QStringLiteral("Jakub Stachowski"))
|
||||
<< Person(QStringLiteral("Paul Cifarelli"))
|
||||
<< Person(QStringLiteral("Felipe Rivera"))
|
||||
<< Person(QStringLiteral("Alexander Peitz"))
|
||||
<< Person(QStringLiteral("Andreas Muttscheller"))
|
||||
<< Person(QStringLiteral("Mark Furneaux"))
|
||||
<< Person(QStringLiteral("Florian Bigard"))
|
||||
<< Person(QStringLiteral("Alex Bikadorov"))
|
||||
<< Person(QStringLiteral("Mattias Andersson"))
|
||||
<< Person(QStringLiteral("Alan Briolat"))
|
||||
<< Person(QStringLiteral("Arun Narayanankutty"))
|
||||
<< Person(QStringLiteral("Bartłomiej Burdukiewicz"))
|
||||
<< Person(QStringLiteral("Andre Siviero"))
|
||||
<< Person(QStringLiteral("Santiago Gil"))
|
||||
<< Person(QStringLiteral("Tyler Rhodes"))
|
||||
<< Person(QStringLiteral("Vikram Ambrose"))
|
||||
<< Person(QStringLiteral("David Guillen"))
|
||||
<< Person(QStringLiteral("Krzysztof Sobiecki"))
|
||||
<< Person(QStringLiteral("Valeriy Malov"))
|
||||
<< Person(QStringLiteral("Nick Lanham"));
|
||||
<< Person(u"Jakub Stachowski"_s)
|
||||
<< Person(u"Paul Cifarelli"_s)
|
||||
<< Person(u"Felipe Rivera"_s)
|
||||
<< Person(u"Alexander Peitz"_s)
|
||||
<< Person(u"Andreas Muttscheller"_s)
|
||||
<< Person(u"Mark Furneaux"_s)
|
||||
<< Person(u"Florian Bigard"_s)
|
||||
<< Person(u"Alex Bikadorov"_s)
|
||||
<< Person(u"Mattias Andersson"_s)
|
||||
<< Person(u"Alan Briolat"_s)
|
||||
<< Person(u"Arun Narayanankutty"_s)
|
||||
<< Person(u"Bartłomiej Burdukiewicz"_s)
|
||||
<< Person(u"Andre Siviero"_s)
|
||||
<< Person(u"Santiago Gil"_s)
|
||||
<< Person(u"Tyler Rhodes"_s)
|
||||
<< Person(u"Vikram Ambrose"_s)
|
||||
<< Person(u"David Guillen"_s)
|
||||
<< Person(u"Krzysztof Sobiecki"_s)
|
||||
<< Person(u"Valeriy Malov"_s)
|
||||
<< Person(u"Nick Lanham"_s);
|
||||
|
||||
strawberry_thanks_ \
|
||||
<< Person(QStringLiteral("Mark Kretschmann"))
|
||||
<< Person(QStringLiteral("Max Howell"))
|
||||
<< Person(QStringLiteral("Artur Rona"))
|
||||
<< Person(QStringLiteral("Robert-André Mauchin"))
|
||||
<< Person(QStringLiteral("Thomas Pierson"))
|
||||
<< Person(QStringLiteral("Fabio Loli"));
|
||||
<< Person(u"Mark Kretschmann"_s)
|
||||
<< Person(u"Max Howell"_s)
|
||||
<< Person(u"Artur Rona"_s)
|
||||
<< Person(u"Robert-André Mauchin"_s)
|
||||
<< Person(u"Thomas Pierson"_s)
|
||||
<< Person(u"Fabio Loli"_s);
|
||||
|
||||
QFont title_font;
|
||||
title_font.setBold(true);
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include "core/application.h"
|
||||
#include "core/database.h"
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
Console::Console(Application *app, QWidget *parent) : QDialog(parent), ui_{}, app_(app) {
|
||||
|
||||
ui_.setupUi(this);
|
||||
@@ -48,7 +50,7 @@ Console::Console(Application *app, QWidget *parent) : QDialog(parent), ui_{}, ap
|
||||
|
||||
QObject::connect(ui_.run, &QPushButton::clicked, this, &Console::RunQuery);
|
||||
|
||||
QFont font(QStringLiteral("Monospace"));
|
||||
QFont font(u"Monospace"_s);
|
||||
font.setStyleHint(QFont::TypeWriter);
|
||||
|
||||
ui_.output->setFont(font);
|
||||
@@ -69,7 +71,7 @@ void Console::RunQuery() {
|
||||
return;
|
||||
}
|
||||
|
||||
ui_.output->append(QStringLiteral("<b>> ") + query.executedQuery() + QStringLiteral("</b>"));
|
||||
ui_.output->append(u"<b>> "_s + query.executedQuery() + u"</b>"_s);
|
||||
|
||||
while (query.next() && query.isValid()) {
|
||||
QSqlRecord record = query.record();
|
||||
|
||||
@@ -147,7 +147,7 @@ EditTagDialog::EditTagDialog(Application *app, QWidget *parent)
|
||||
ui_->loading_label->hide();
|
||||
ui_->label_lyrics->hide();
|
||||
|
||||
ui_->fetch_tag->setIcon(QPixmap::fromImage(QImage(QStringLiteral(":/pictures/musicbrainz.png"))));
|
||||
ui_->fetch_tag->setIcon(QPixmap::fromImage(QImage(u":/pictures/musicbrainz.png"_s)));
|
||||
#ifdef HAVE_MUSICBRAINZ
|
||||
ui_->fetch_tag->setEnabled(true);
|
||||
#else
|
||||
@@ -235,8 +235,8 @@ EditTagDialog::EditTagDialog(Application *app, QWidget *parent)
|
||||
ui_->summary_art->installEventFilter(this);
|
||||
|
||||
// Add the next/previous buttons
|
||||
previous_button_ = new QPushButton(IconLoader::Load(QStringLiteral("go-previous")), tr("Previous"), this);
|
||||
next_button_ = new QPushButton(IconLoader::Load(QStringLiteral("go-next")), tr("Next"), this);
|
||||
previous_button_ = new QPushButton(IconLoader::Load(u"go-previous"_s), tr("Previous"), this);
|
||||
next_button_ = new QPushButton(IconLoader::Load(u"go-next"_s), tr("Next"), this);
|
||||
ui_->button_box->addButton(previous_button_, QDialogButtonBox::ResetRole);
|
||||
ui_->button_box->addButton(next_button_, QDialogButtonBox::ResetRole);
|
||||
|
||||
@@ -315,7 +315,7 @@ void EditTagDialog::hideEvent(QHideEvent *e) {
|
||||
void EditTagDialog::accept() {
|
||||
|
||||
// Show the loading indicator
|
||||
if (!SetLoading(tr("Saving tracks") + QStringLiteral("..."))) return;
|
||||
if (!SetLoading(tr("Saving tracks") + u"..."_s)) return;
|
||||
|
||||
SaveData();
|
||||
|
||||
@@ -416,7 +416,7 @@ QList<EditTagDialog::Data> EditTagDialog::LoadData(const SongList &songs) {
|
||||
void EditTagDialog::SetSongs(const SongList &s, const PlaylistItemPtrList &items) {
|
||||
|
||||
// Show the loading indicator
|
||||
if (!SetLoading(tr("Loading tracks") + QStringLiteral("..."))) return;
|
||||
if (!SetLoading(tr("Loading tracks") + u"..."_s)) return;
|
||||
|
||||
data_.clear();
|
||||
playlist_items_ = items;
|
||||
@@ -790,12 +790,12 @@ void EditTagDialog::UpdateSummaryTab(const Song &song) {
|
||||
cover_options.device_pixel_ratio = devicePixelRatioF();
|
||||
summary_cover_art_id_ = app_->album_cover_loader()->LoadImageAsync(cover_options, song);
|
||||
|
||||
ui_->summary->setText(QStringLiteral("<p><b>") + song.PrettyTitleWithArtist().toHtmlEscaped() + QStringLiteral("</b></p>"));
|
||||
ui_->summary->setText(u"<p><b>"_s + song.PrettyTitleWithArtist().toHtmlEscaped() + u"</b></p>"_s);
|
||||
|
||||
ui_->length->setText(Utilities::PrettyTimeNanosec(song.length_nanosec()));
|
||||
|
||||
SetText(ui_->samplerate, song.samplerate(), QStringLiteral("Hz"));
|
||||
SetText(ui_->bitdepth, song.bitdepth(), QStringLiteral("Bit"));
|
||||
SetText(ui_->samplerate, song.samplerate(), u"Hz"_s);
|
||||
SetText(ui_->bitdepth, song.bitdepth(), u"Bit"_s);
|
||||
SetText(ui_->bitrate, song.bitrate(), tr("kbps"));
|
||||
ui_->ebur128_integrated_loudness->setText(song.Ebur128LoudnessLUFSToText());
|
||||
ui_->ebur128_loudness_range->setText(song.Ebur128LoudnessRangeLUToText());
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include "core/iconloader.h"
|
||||
#include "scrobbler/lastfmimport.h"
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
LastFMImportDialog::LastFMImportDialog(SharedPtr<LastFMImport> lastfm_import, QWidget *parent)
|
||||
: QDialog(parent),
|
||||
ui_(new Ui_LastFMImportDialog),
|
||||
@@ -41,7 +43,7 @@ LastFMImportDialog::LastFMImportDialog(SharedPtr<LastFMImport> lastfm_import, QW
|
||||
|
||||
ui_->setupUi(this);
|
||||
|
||||
setWindowIcon(IconLoader::Load(QStringLiteral("scrobble")));
|
||||
setWindowIcon(IconLoader::Load(u"scrobble"_s));
|
||||
|
||||
ui_->stackedWidget->setCurrentWidget(ui_->page_start);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ SnapDialog::SnapDialog(QWidget *parent) : MessageDialog(parent) {
|
||||
|
||||
setWindowTitle(tr("Strawberry is running as a Snap"));
|
||||
|
||||
const QIcon icon = IconLoader::Load(QStringLiteral("dialog-warning"));
|
||||
const QIcon icon = IconLoader::Load(u"dialog-warning"_s);
|
||||
const QPixmap pixmap = icon.pixmap(QSize(64, 64), devicePixelRatioF());
|
||||
ui_->label_logo->setPixmap(pixmap);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user