Formatting

This commit is contained in:
Jonas Kvinge
2021-06-12 20:53:23 +02:00
parent 427b9c1ebc
commit f786a17014
117 changed files with 444 additions and 434 deletions

View File

@@ -35,7 +35,7 @@ class DynamicPlaylistControls : public QWidget {
void TurnOff();
private:
Ui_DynamicPlaylistControls* ui_;
Ui_DynamicPlaylistControls *ui_;
};
#endif // DYNAMICPLAYLISTCONTROLS_H

View File

@@ -724,7 +724,7 @@ void Playlist::set_current_row(const int i, const AutoScroll autoscroll, const b
void Playlist::InsertDynamicItems(const int count) {
PlaylistGeneratorInserter* inserter = new PlaylistGeneratorInserter(task_manager_, collection_, this);
PlaylistGeneratorInserter *inserter = new PlaylistGeneratorInserter(task_manager_, collection_, this);
QObject::connect(inserter, &PlaylistGeneratorInserter::Error, this, &Playlist::Error);
QObject::connect(inserter, &PlaylistGeneratorInserter::PlayRequested, this, &Playlist::PlayRequested);

View File

@@ -243,7 +243,7 @@ class Playlist : public QAbstractListModel {
void InsertCollectionItems(const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void InsertSongs(const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void InsertSongsOrCollectionItems(const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void InsertInternetItems(InternetService* service, const SongList& songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void InsertInternetItems(InternetService *service, const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void InsertSmartPlaylist(PlaylistGeneratorPtr gen, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void ReshuffleIndices();

View File

@@ -81,14 +81,14 @@ class PlaylistManagerInterface : public QObject {
virtual void PlaySmartPlaylist(PlaylistGeneratorPtr generator, const bool as_new, const bool clear) = 0;
public slots:
virtual void New(const QString &name, const SongList& songs = SongList(), const QString &special_type = QString()) = 0;
virtual void New(const QString &name, const SongList &songs = SongList(), const QString &special_type = QString()) = 0;
virtual void Load(const QString &filename) = 0;
virtual void Save(const int id, const QString &filename, const Playlist::Path path_type) = 0;
virtual void Rename(const int id, const QString &new_name) = 0;
virtual void Delete(const int id) = 0;
virtual bool Close(const int id) = 0;
virtual void Open(const int id) = 0;
virtual void ChangePlaylistOrder(const QList<int>& ids) = 0;
virtual void ChangePlaylistOrder(const QList<int> &ids) = 0;
virtual void SongChangeRequestProcessed(const QUrl &url, const bool valid) = 0;
@@ -206,12 +206,12 @@ class PlaylistManager : public PlaylistManagerInterface {
void RemoveDuplicatesCurrent() override;
void RemoveUnavailableCurrent() override;
void SongChangeRequestProcessed(const QUrl& url, const bool valid) override;
void SongChangeRequestProcessed(const QUrl &url, const bool valid) override;
void InsertUrls(const int id, const QList<QUrl> &urls, const int pos = -1, const bool play_now = false, const bool enqueue = false);
void InsertSongs(const int id, const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false);
// Removes items with given indices from the playlist. This operation is not undoable.
void RemoveItemsWithoutUndo(const int id, const QList<int>& indices);
void RemoveItemsWithoutUndo(const int id, const QList<int> &indices);
// Remove the current playing song
void RemoveCurrentSong();
@@ -229,8 +229,8 @@ class PlaylistManager : public PlaylistManagerInterface {
void OneOfPlaylistsChanged();
void UpdateSummaryText();
void SongsDiscovered(const SongList& songs);
void ItemsLoadedForSavePlaylist(const SongList &songs, const QString& filename, const Playlist::Path path_type);
void SongsDiscovered(const SongList &songs);
void ItemsLoadedForSavePlaylist(const SongList &songs, const QString &filename, const Playlist::Path path_type);
void PlaylistLoaded();
private:

View File

@@ -48,7 +48,7 @@ class PlaylistSaveOptionsDialog : public QDialog {
private:
static const char *kSettingsGroup;
Ui::PlaylistSaveOptionsDialog* ui;
Ui::PlaylistSaveOptionsDialog *ui;
};
#endif // PLAYLISTSAVEOPTIONSDIALOG_H

View File

@@ -81,14 +81,14 @@ class PlaylistSequence : public QWidget {
void ShuffleModeChanged(PlaylistSequence::ShuffleMode mode);
private slots:
void RepeatActionTriggered(QAction *);
void ShuffleActionTriggered(QAction *);
void RepeatActionTriggered(QAction *action);
void ShuffleActionTriggered(QAction *action);
private:
void Load();
void Save();
static QIcon AddDesaturatedIcon(const QIcon& icon);
static QPixmap DesaturatedPixmap(const QPixmap& pixmap);
static QIcon AddDesaturatedIcon(const QIcon &icon);
static QPixmap DesaturatedPixmap(const QPixmap &pixmap);
private:
Ui_PlaylistSequence *ui_;

View File

@@ -34,7 +34,7 @@
namespace PlaylistUndoCommands {
Base::Base(Playlist* playlist) : QUndoCommand(nullptr), playlist_(playlist) {}
Base::Base(Playlist *playlist) : QUndoCommand(nullptr), playlist_(playlist) {}
InsertItems::InsertItems(Playlist *playlist, const PlaylistItemList &items, int pos, bool enqueue, bool enqueue_next)
: Base(playlist),
@@ -84,7 +84,7 @@ void RemoveItems::undo() {
}
bool RemoveItems::mergeWith(const QUndoCommand *other) {
const RemoveItems* remove_command = static_cast<const RemoveItems*>(other);
const RemoveItems *remove_command = static_cast<const RemoveItems*>(other);
ranges_.append(remove_command->ranges_);
int sum = 0;
@@ -111,14 +111,14 @@ void MoveItems::undo() {
playlist_->MoveItemsWithoutUndo(pos_, source_rows_);
}
ReOrderItems::ReOrderItems(Playlist* playlist, const PlaylistItemList &new_items)
ReOrderItems::ReOrderItems(Playlist *playlist, const PlaylistItemList &new_items)
: Base(playlist), old_items_(playlist->items_), new_items_(new_items) {}
void ReOrderItems::undo() { playlist_->ReOrderWithoutUndo(old_items_); }
void ReOrderItems::redo() { playlist_->ReOrderWithoutUndo(new_items_); }
SortItems::SortItems(Playlist* playlist, int column, Qt::SortOrder order, const PlaylistItemList &new_items)
SortItems::SortItems(Playlist *playlist, int column, Qt::SortOrder order, const PlaylistItemList &new_items)
: ReOrderItems(playlist, new_items) {
Q_UNUSED(column);
@@ -129,7 +129,7 @@ SortItems::SortItems(Playlist* playlist, int column, Qt::SortOrder order, const
}
ShuffleItems::ShuffleItems(Playlist* playlist, const PlaylistItemList &new_items)
ShuffleItems::ShuffleItems(Playlist *playlist, const PlaylistItemList &new_items)
: ReOrderItems(playlist, new_items)
{
setText(tr("shuffle songs"));