Skip to content
/ mixxx Public
forked from mixxxdj/mixxx

Commit

Permalink
Replace QString with QStringLiteral where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ninomp committed Dec 21, 2022
1 parent 9fadb20 commit fe7b602
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/library/autodj/autodjfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down
16 changes: 6 additions & 10 deletions src/library/autodj/dlgautodj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
Expand All @@ -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 {
Expand Down

0 comments on commit fe7b602

Please sign in to comment.