From fe7b602e653ae177ed11c9f6f2ba24d23680584b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nino=20Mi=C5=A1ki=C4=87-Pletenac?= Date: Thu, 22 Dec 2022 00:00:00 +0100 Subject: [PATCH] Replace QString with QStringLiteral where possible --- src/library/autodj/autodjfeature.cpp | 2 +- src/library/autodj/dlgautodj.cpp | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp index 3e923211ea4..f4087af4b65 100644 --- a/src/library/autodj/autodjfeature.cpp +++ b/src/library/autodj/autodjfeature.cpp @@ -128,7 +128,7 @@ void AutoDJFeature::updateTitle() { PlaylistSummary summary; if (m_pTrackCollection->playlists().readAutoDJPlaylistSummary(&summary) && summary.getTrackCount() > 0) { - title.append(QString(" (%1) %2") + title.append(QStringLiteral(" (%1) %2") .arg(QString::number(summary.getTrackCount()), summary.getTrackDurationText())); } diff --git a/src/library/autodj/dlgautodj.cpp b/src/library/autodj/dlgautodj.cpp index 0414f2d168b..b600c3cedb1 100644 --- a/src/library/autodj/dlgautodj.cpp +++ b/src/library/autodj/dlgautodj.cpp @@ -367,13 +367,12 @@ void DlgAutoDJ::updateSelectionInfo() { } } - QString label; - if (!indices.isEmpty()) { - label.append(mixxx::DurationBase::formatTime(duration)); - label.append(QString(" (%1) / ").arg(indices.size())); labelSelectionInfo->setToolTip(tr("Displays the duration and number of selected tracks.")); - labelSelectionInfo->setText(label); + labelSelectionInfo->setText( + QStringLiteral("%1 (%2) / ") + .arg(mixxx::DurationBase::formatTime(duration), + indices.size())); labelSelectionInfo->setEnabled(true); } else { labelSelectionInfo->setText(""); @@ -387,11 +386,8 @@ void DlgAutoDJ::updateTotalInfo() { return; } - QString label; - label.append(summary.getTrackDurationText()); - label.append(QString(" (%1)").arg(summary.getTrackCount())); - - labelTotalInfo->setText(label); + labelTotalInfo->setText(QStringLiteral("%1 (%2)").arg( + summary.getTrackDurationText(), summary.getTrackCount())); } bool DlgAutoDJ::hasFocus() const {