Formatting
This commit is contained in:
@@ -505,7 +505,7 @@ bool PlaylistContainer::eventFilter(QObject *objectWatched, QEvent *event) {
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent *e = static_cast<QKeyEvent*>(event);
|
||||
switch (e->key()) {
|
||||
//case Qt::Key_Up:
|
||||
// case Qt::Key_Up:
|
||||
case Qt::Key_Down:
|
||||
case Qt::Key_PageUp:
|
||||
case Qt::Key_PageDown:
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
#include "playlistlistsortfiltermodel.h"
|
||||
|
||||
PlaylistListSortFilterModel::PlaylistListSortFilterModel(QObject *parent)
|
||||
: QSortFilterProxyModel(parent) {}
|
||||
: QSortFilterProxyModel(parent) {}
|
||||
|
||||
bool PlaylistListSortFilterModel::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
||||
|
||||
// Compare the display text first.
|
||||
const int ret = left.data().toString().localeAwareCompare(right.data().toString());
|
||||
if (ret < 0) return true;
|
||||
if (ret > 0) return false;
|
||||
// Compare the display text first.
|
||||
const int ret = left.data().toString().localeAwareCompare(right.data().toString());
|
||||
if (ret < 0) return true;
|
||||
if (ret > 0) return false;
|
||||
|
||||
// Now use the source model row order to ensure we always get a deterministic sorting even when two items are named the same.
|
||||
return left.row() < right.row();
|
||||
// Now use the source model row order to ensure we always get a deterministic sorting even when two items are named the same.
|
||||
return left.row() < right.row();
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ void PlaylistListView::dropEvent(QDropEvent *e) {
|
||||
Q_EMIT ItemMimeDataDroppedSignal(currentIndex(), e->mimeData());
|
||||
}
|
||||
}
|
||||
else {
|
||||
else {
|
||||
AutoExpandingTreeView::dropEvent(e);
|
||||
}
|
||||
|
||||
|
||||
@@ -234,11 +234,11 @@ void PlaylistSequence::CycleShuffleMode() {
|
||||
|
||||
}
|
||||
|
||||
//called from global shortcut
|
||||
// called from global shortcut
|
||||
void PlaylistSequence::CycleRepeatMode() {
|
||||
|
||||
RepeatMode mode = RepeatMode::Off;
|
||||
//we cycle through the repeat modes
|
||||
// we cycle through the repeat modes
|
||||
switch (repeat_mode()) {
|
||||
case RepeatMode::Off: mode = RepeatMode::Track; break;
|
||||
case RepeatMode::Track: mode = RepeatMode::Album; break;
|
||||
|
||||
@@ -127,7 +127,7 @@ void PlaylistTabBar::contextMenuEvent(QContextMenuEvent *e) {
|
||||
|
||||
// We need to finish the renaming action before showing context menu
|
||||
if (rename_editor_->isVisible()) {
|
||||
//discard any change
|
||||
// discard any change
|
||||
HideEditor();
|
||||
}
|
||||
|
||||
@@ -231,11 +231,10 @@ void PlaylistTabBar::CloseSlot() {
|
||||
confirmation_box.setWindowIcon(QIcon(u":/icons/64x64/strawberry.png"_s));
|
||||
confirmation_box.setWindowTitle(tr("Remove playlist"));
|
||||
confirmation_box.setIcon(QMessageBox::Question);
|
||||
confirmation_box.setText(
|
||||
tr("You are about to remove a playlist which is not part of your "
|
||||
"favorite playlists: "
|
||||
"the playlist will be deleted (this action cannot be undone). \n"
|
||||
"Are you sure you want to continue?"));
|
||||
confirmation_box.setText(tr("You are about to remove a playlist which is not part of your "
|
||||
"favorite playlists: "
|
||||
"the playlist will be deleted (this action cannot be undone). \n"
|
||||
"Are you sure you want to continue?"));
|
||||
confirmation_box.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
|
||||
|
||||
QCheckBox dont_prompt_again(tr("Warn me when closing a playlist tab"), &confirmation_box);
|
||||
|
||||
Reference in New Issue
Block a user