Formatting

This commit is contained in:
Jonas Kvinge
2022-03-22 21:09:05 +01:00
parent 8cb4e75f70
commit f6b70fda71
106 changed files with 446 additions and 479 deletions

View File

@@ -177,7 +177,7 @@ Playlist::~Playlist() {
collection_items_by_id_.clear();
}
template <typename T>
template<typename T>
void Playlist::InsertSongItems(const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next) {
PlaylistItemList items;
@@ -1189,7 +1189,7 @@ void Playlist::UpdateItems(SongList songs) {
// then we remove song from our list because we will not need to check it again.
// And we also update undo actions.
for (int i = 0; i < items_.size(); i++) {
for (int i = 0; i < items_.size(); i++) {
// Update current items list
QMutableListIterator<Song> it(songs);
while (it.hasNext()) {
@@ -2168,13 +2168,12 @@ void Playlist::RemoveDeletedSongs() {
}
removeRows(rows_to_remove);
}
namespace {
struct SongSimilarHash {
size_t operator() (const Song &song) const {
size_t operator()(const Song &song) const {
return HashSimilar(song);
}
};

View File

@@ -357,7 +357,7 @@ class Playlist : public QAbstractListModel {
int PreviousVirtualIndex(int i, const bool ignore_repeat_track) const;
bool FilterContainsVirtualIndex(const int i) const;
template <typename T>
template<typename T>
void InsertSongItems(const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next = false);
// Modify the playlist without changing the undo stack. These are used by our friends in PlaylistUndoCommands

View File

@@ -26,7 +26,7 @@ class PlaylistListSortFilterModel : public QSortFilterProxyModel {
public:
explicit PlaylistListSortFilterModel(QObject *parent)
: QSortFilterProxyModel(parent) {}
: QSortFilterProxyModel(parent) {}
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override {
// Compare the display text first.

View File

@@ -428,7 +428,7 @@ void PlaylistTabBar::dropEvent(QDropEvent *e) {
if (drag_hover_tab_ == -1) {
const MimeData *mime_data = qobject_cast<const MimeData*>(e->mimeData());
if(mime_data && !mime_data->name_for_new_playlist_.isEmpty()) {
if (mime_data && !mime_data->name_for_new_playlist_.isEmpty()) {
manager_->New(mime_data->name_for_new_playlist_);
}
else {