Port to QStringLiteral operator

This commit is contained in:
Jonas Kvinge
2024-10-20 06:38:55 +02:00
parent 722035913e
commit ef9ef63f02
202 changed files with 2036 additions and 1889 deletions

View File

@@ -61,6 +61,8 @@
#include "widgets/searchfield.h"
#include "settings/appearancesettingspage.h"
using namespace Qt::Literals::StringLiterals;
namespace {
constexpr char kSettingsGroup[] = "Playlist";
constexpr int kFilterDelayMs = 100;
@@ -97,7 +99,7 @@ PlaylistContainer::PlaylistContainer(QWidget *parent)
no_matches_label_->setPalette(no_matches_palette);
// Remove QFrame border
ui_->toolbar->setStyleSheet(QStringLiteral("QFrame { border: 0px; }"));
ui_->toolbar->setStyleSheet(u"QFrame { border: 0px; }"_s);
// Make it bold
QFont no_matches_font = no_matches_label_->font();
@@ -228,9 +230,9 @@ void PlaylistContainer::SetViewModel(Playlist *playlist, const int scroll_positi
delete redo_;
undo_ = playlist->undo_stack()->createUndoAction(this, tr("Undo"));
redo_ = playlist->undo_stack()->createRedoAction(this, tr("Redo"));
undo_->setIcon(IconLoader::Load(QStringLiteral("edit-undo")));
undo_->setIcon(IconLoader::Load(u"edit-undo"_s));
undo_->setShortcut(QKeySequence::Undo);
redo_->setIcon(IconLoader::Load(QStringLiteral("edit-redo")));
redo_->setIcon(IconLoader::Load(u"edit-redo"_s));
redo_->setShortcut(QKeySequence::Redo);
ui_->undo->setDefaultAction(undo_);
@@ -279,11 +281,11 @@ void PlaylistContainer::FocusSearchField() {
}
void PlaylistContainer::ActivePlaying() {
UpdateActiveIcon(QIcon(QStringLiteral(":/pictures/tiny-play.png")));
UpdateActiveIcon(QIcon(u":/pictures/tiny-play.png"_s));
}
void PlaylistContainer::ActivePaused() {
UpdateActiveIcon(QIcon(QStringLiteral(":/pictures/tiny-pause.png")));
UpdateActiveIcon(QIcon(u":/pictures/tiny-pause.png"_s));
}
void PlaylistContainer::ActiveStopped() { UpdateActiveIcon(QIcon()); }