Add const/references to all signal parameters
This commit is contained in:
@@ -325,11 +325,11 @@ class Playlist : public QAbstractListModel {
|
||||
signals:
|
||||
void RestoreFinished();
|
||||
void PlaylistLoaded();
|
||||
void CurrentSongChanged(Song metadata);
|
||||
void SongMetadataChanged(Song metadata);
|
||||
void EditingFinished(const int playlist_id, QModelIndex idx);
|
||||
void PlayRequested(QModelIndex idx, Playlist::AutoScroll autoscroll);
|
||||
void MaybeAutoscroll(Playlist::AutoScroll autoscroll);
|
||||
void CurrentSongChanged(const Song &metadata);
|
||||
void SongMetadataChanged(const Song &metadata);
|
||||
void EditingFinished(const int playlist_id, const QModelIndex idx);
|
||||
void PlayRequested(const QModelIndex idx, const Playlist::AutoScroll autoscroll);
|
||||
void MaybeAutoscroll(const Playlist::AutoScroll autoscroll);
|
||||
|
||||
// Signals that the underlying list of items was changed, meaning that something was added to it, removed from it or the ordering changed.
|
||||
void PlaylistChanged();
|
||||
|
||||
@@ -65,8 +65,8 @@ class PlaylistContainer : public QWidget {
|
||||
bool eventFilter(QObject *objectWatched, QEvent *event) override;
|
||||
|
||||
signals:
|
||||
void TabChanged(int id);
|
||||
void Rename(int id, QString new_name);
|
||||
void TabChanged(const int id);
|
||||
void Rename(const int id, const QString &new_name);
|
||||
|
||||
void UndoRedoActionsChanged(QAction *undo, QAction *redo);
|
||||
void ViewSelectionModelChanged();
|
||||
|
||||
@@ -53,9 +53,9 @@ class PlaylistHeader : public StretchHeaderView {
|
||||
#endif
|
||||
|
||||
signals:
|
||||
void SectionVisibilityChanged(int logical, bool visible);
|
||||
void SectionVisibilityChanged(const int logical, const bool visible);
|
||||
void MouseEntered();
|
||||
void SectionRatingLockStatusChanged(bool);
|
||||
void SectionRatingLockStatusChanged(const bool);
|
||||
|
||||
private slots:
|
||||
void HideCurrent();
|
||||
|
||||
@@ -81,8 +81,8 @@ class PlaylistListModel : public QStandardItemModel {
|
||||
bool setData(const QModelIndex &idx, const QVariant &value, int role) override;
|
||||
|
||||
signals:
|
||||
void PlaylistPathChanged(int id, QString new_path);
|
||||
void PlaylistRenamed(int id, QString new_name);
|
||||
void PlaylistPathChanged(const int id, const QString &new_path);
|
||||
void PlaylistRenamed(const int id, const QString &new_name);
|
||||
|
||||
private slots:
|
||||
void RowsChanged(const QModelIndex &begin, const QModelIndex &end);
|
||||
|
||||
@@ -41,7 +41,7 @@ class PlaylistListView : public AutoExpandingTreeView {
|
||||
bool ItemsSelected() const;
|
||||
|
||||
signals:
|
||||
void ItemsSelectedChanged(bool);
|
||||
void ItemsSelectedChanged(const bool);
|
||||
|
||||
protected:
|
||||
// QWidget
|
||||
|
||||
@@ -117,25 +117,25 @@ class PlaylistManagerInterface : public QObject {
|
||||
void PlaylistManagerInitialized();
|
||||
void AllPlaylistsLoaded();
|
||||
|
||||
void PlaylistAdded(int id, QString name, bool favorite);
|
||||
void PlaylistDeleted(int id);
|
||||
void PlaylistClosed(int id);
|
||||
void PlaylistRenamed(int id, QString new_name);
|
||||
void PlaylistFavorited(int id, bool favorite);
|
||||
void CurrentChanged(Playlist *new_playlist, int scroll_position = 0);
|
||||
void PlaylistAdded(const int id, const QString &name, const bool favorite);
|
||||
void PlaylistDeleted(const int id);
|
||||
void PlaylistClosed(const int id);
|
||||
void PlaylistRenamed(const int id, const QString &new_name);
|
||||
void PlaylistFavorited(const int id, const bool favorite);
|
||||
void CurrentChanged(Playlist *new_playlist, const int scroll_position = 0);
|
||||
void ActiveChanged(Playlist *new_playlist);
|
||||
|
||||
void Error(QString message);
|
||||
void SummaryTextChanged(QString summary);
|
||||
void Error(const QString &message);
|
||||
void SummaryTextChanged(const QString &summary);
|
||||
|
||||
// Forwarded from individual playlists
|
||||
void CurrentSongChanged(Song song);
|
||||
void SongMetadataChanged(Song song);
|
||||
void CurrentSongChanged(const Song &song);
|
||||
void SongMetadataChanged(const Song &song);
|
||||
|
||||
// Signals that one of manager's playlists has changed (new items, new ordering etc.) - the argument shows which.
|
||||
void PlaylistChanged(Playlist *playlist);
|
||||
void EditingFinished(int playlist_id, QModelIndex idx);
|
||||
void PlayRequested(QModelIndex idx, Playlist::AutoScroll autoscroll);
|
||||
void EditingFinished(const int playlist_id, const QModelIndex idx);
|
||||
void PlayRequested(const QModelIndex idx, const Playlist::AutoScroll autoscroll);
|
||||
};
|
||||
|
||||
class PlaylistManager : public PlaylistManagerInterface {
|
||||
|
||||
@@ -77,8 +77,8 @@ class PlaylistSequence : public QWidget {
|
||||
void CycleRepeatMode();
|
||||
|
||||
signals:
|
||||
void RepeatModeChanged(PlaylistSequence::RepeatMode mode);
|
||||
void ShuffleModeChanged(PlaylistSequence::ShuffleMode mode);
|
||||
void RepeatModeChanged(const PlaylistSequence::RepeatMode mode);
|
||||
void ShuffleModeChanged(const PlaylistSequence::ShuffleMode mode);
|
||||
|
||||
private slots:
|
||||
void RepeatActionTriggered(QAction *action);
|
||||
|
||||
@@ -72,12 +72,12 @@ class PlaylistTabBar : public QTabBar {
|
||||
void InsertTab(const int id, const int index, const QString &text, const bool favorite);
|
||||
|
||||
signals:
|
||||
void CurrentIdChanged(int id);
|
||||
void Rename(int id, QString name);
|
||||
void Close(int id);
|
||||
void Save(int id);
|
||||
void PlaylistOrderChanged(QList<int> ids);
|
||||
void PlaylistFavorited(int id, bool favorite);
|
||||
void CurrentIdChanged(const int id);
|
||||
void Rename(const int id, const QString &name);
|
||||
void Close(const int id);
|
||||
void Save(const int id);
|
||||
void PlaylistOrderChanged(const QList<int> &ids);
|
||||
void PlaylistFavorited(const int id, const bool favorite);
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
|
||||
@@ -127,14 +127,14 @@ class PlaylistView : public QTreeView {
|
||||
void edit(const QModelIndex &idx) { QAbstractItemView::edit(idx); }
|
||||
|
||||
signals:
|
||||
void PlayItem(QModelIndex idx, Playlist::AutoScroll autoscroll);
|
||||
void PlayPause(const quint64 offset_nanosec = 0, Playlist::AutoScroll autoscroll = Playlist::AutoScroll::Never);
|
||||
void RightClicked(QPoint global_pos, QModelIndex idx);
|
||||
void PlayItem(const QModelIndex idx, const Playlist::AutoScroll autoscroll);
|
||||
void PlayPause(const quint64 offset_nanosec = 0, const Playlist::AutoScroll autoscroll = Playlist::AutoScroll::Never);
|
||||
void RightClicked(const QPoint global_pos, const QModelIndex idx);
|
||||
void SeekForward();
|
||||
void SeekBackward();
|
||||
void FocusOnFilterSignal(QKeyEvent *event);
|
||||
void BackgroundPropertyChanged();
|
||||
void ColumnAlignmentChanged(ColumnAlignmentMap alignment);
|
||||
void ColumnAlignmentChanged(const ColumnAlignmentMap alignment);
|
||||
|
||||
protected:
|
||||
// QWidget
|
||||
|
||||
@@ -48,9 +48,9 @@ class SongLoaderInserter : public QObject {
|
||||
void LoadAudioCD(Playlist *destination, int row, bool play_now, bool enqueue, bool enqueue_next);
|
||||
|
||||
signals:
|
||||
void Error(QString message);
|
||||
void Error(const QString &message);
|
||||
void PreloadFinished();
|
||||
void EffectiveLoadFinished(SongList songs);
|
||||
void EffectiveLoadFinished(const SongList &songs);
|
||||
|
||||
private slots:
|
||||
void DestinationDestroyed();
|
||||
|
||||
Reference in New Issue
Block a user