Add const/references to all signal parameters
This commit is contained in:
@@ -118,9 +118,9 @@ class Application : public QObject {
|
||||
void OpenSettingsDialogAtPage(SettingsDialog::Page page);
|
||||
|
||||
signals:
|
||||
void ErrorAdded(QString message);
|
||||
void ErrorAdded(const QString &message);
|
||||
void SettingsChanged();
|
||||
void SettingsDialogRequested(SettingsDialog::Page page);
|
||||
void SettingsDialogRequested(const SettingsDialog::Page page);
|
||||
void ExitFinished();
|
||||
void ClearPixmapDiskCache();
|
||||
|
||||
|
||||
@@ -88,8 +88,8 @@ class Database : public QObject {
|
||||
|
||||
signals:
|
||||
void ExitFinished();
|
||||
void Error(QString error);
|
||||
void Errors(QStringList errors);
|
||||
void Error(const QString &error);
|
||||
void Errors(const QStringList &errors);
|
||||
|
||||
private slots:
|
||||
void Exit();
|
||||
|
||||
@@ -48,7 +48,7 @@ class DeleteFiles : public QObject {
|
||||
void Start(const QStringList &filenames);
|
||||
|
||||
signals:
|
||||
void Finished(SongList songs_with_errors);
|
||||
void Finished(const SongList &songs_with_errors);
|
||||
|
||||
private slots:
|
||||
void ProcessSomeFiles();
|
||||
|
||||
@@ -40,7 +40,7 @@ class FileSystemWatcherInterface : public QObject {
|
||||
static FileSystemWatcherInterface *Create(QObject *parent = nullptr);
|
||||
|
||||
signals:
|
||||
void PathChanged(QString path);
|
||||
void PathChanged(const QString &path);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@ class MacFSListener : public FileSystemWatcherInterface {
|
||||
void Clear();
|
||||
|
||||
signals:
|
||||
void PathChanged(QString path);
|
||||
void PathChanged(const QString &path);
|
||||
|
||||
private slots:
|
||||
void UpdateStream();
|
||||
|
||||
@@ -76,7 +76,7 @@ class SystemTrayIcon : public QObject {
|
||||
void ActionChanged();
|
||||
|
||||
signals:
|
||||
void ChangeVolume(int delta);
|
||||
void ChangeVolume(const int delta);
|
||||
void SeekForward();
|
||||
void SeekBackward();
|
||||
void NextTrack();
|
||||
|
||||
@@ -132,12 +132,12 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||
bool LoadUrl(const QString &url) override;
|
||||
|
||||
signals:
|
||||
void AlbumCoverReady(Song song, QImage image);
|
||||
void AlbumCoverReady(const Song &song, const QImage &image);
|
||||
void SearchCoverInProgress();
|
||||
// Signals that stop playing after track was toggled.
|
||||
void StopAfterToggled(bool stop);
|
||||
void StopAfterToggled(const bool stop);
|
||||
|
||||
void AuthorizationUrlReceived(QUrl url);
|
||||
void AuthorizationUrlReceived(const QUrl &url);
|
||||
|
||||
private slots:
|
||||
void FilePathChanged(const QString &path);
|
||||
|
||||
@@ -85,7 +85,7 @@ class MergedProxyModel : public QAbstractProxyModel {
|
||||
QModelIndexList mapToSource(const QModelIndexList &proxy_indexes) const;
|
||||
|
||||
signals:
|
||||
void SubModelReset(QModelIndex root, QAbstractItemModel *model);
|
||||
void SubModelReset(const QModelIndex root, QAbstractItemModel *model);
|
||||
|
||||
private slots:
|
||||
void SourceModelReset();
|
||||
|
||||
@@ -188,18 +188,18 @@ class Mpris2 : public QObject {
|
||||
|
||||
signals:
|
||||
// Player
|
||||
void Seeked(qint64 position);
|
||||
void Seeked(const qint64 position);
|
||||
|
||||
// TrackList
|
||||
void TrackListReplaced(Track_Ids Tracks, QDBusObjectPath CurrentTrack);
|
||||
void TrackAdded(TrackMetadata Metadata, QDBusObjectPath AfterTrack);
|
||||
void TrackRemoved(QDBusObjectPath trackId);
|
||||
void TrackMetadataChanged(QDBusObjectPath trackId, TrackMetadata metadata);
|
||||
void TrackListReplaced(const Track_Ids &tracks, const QDBusObjectPath ¤t_track);
|
||||
void TrackAdded(const TrackMetadata &metadata, const QDBusObjectPath &after_track);
|
||||
void TrackRemoved(const QDBusObjectPath &track_id);
|
||||
void TrackMetadataChanged(const QDBusObjectPath &track_id, const TrackMetadata &metadata);
|
||||
|
||||
void RaiseMainWindow();
|
||||
|
||||
// Playlist
|
||||
void PlaylistChanged(MprisPlaylist playlist);
|
||||
void PlaylistChanged(const MprisPlaylist &playlist);
|
||||
|
||||
private slots:
|
||||
void AlbumCoverLoaded(const Song &song, AlbumCoverLoaderResultPtr result = AlbumCoverLoaderResultPtr());
|
||||
|
||||
@@ -111,20 +111,20 @@ class PlayerInterface : public QObject {
|
||||
// Emitted only when playback is manually resumed
|
||||
void Resumed();
|
||||
void Stopped();
|
||||
void Error(QString message = QString());
|
||||
void Error(const QString &message = QString());
|
||||
void PlaylistFinished();
|
||||
void VolumeEnabled(bool);
|
||||
void VolumeChanged(uint volume);
|
||||
void VolumeEnabled(const bool volume_enabled);
|
||||
void VolumeChanged(const uint volume);
|
||||
void TrackSkipped(PlaylistItemPtr old_track);
|
||||
// Emitted when there's a manual change to the current's track position.
|
||||
void Seeked(qint64 microseconds);
|
||||
void Seeked(const qint64 microseconds);
|
||||
|
||||
// Emitted when Player has processed a request to play another song.
|
||||
// This contains the URL of the song and a flag saying whether it was able to play the song.
|
||||
void SongChangeRequestProcessed(QUrl url, bool valid);
|
||||
void SongChangeRequestProcessed(const QUrl &url, const bool valid);
|
||||
|
||||
// The toggle parameter is true when user requests to toggle visibility for Pretty OSD
|
||||
void ForceShowOSD(Song, bool toggle);
|
||||
void ForceShowOSD(const Song &song, const bool toggle);
|
||||
|
||||
void Authenticated();
|
||||
|
||||
@@ -193,7 +193,7 @@ class Player : public PlayerInterface {
|
||||
void HandleAuthentication();
|
||||
|
||||
signals:
|
||||
void EngineChanged(Engine::EngineType enginetype);
|
||||
void EngineChanged(const Engine::EngineType enginetype);
|
||||
|
||||
private slots:
|
||||
void EngineStateChanged(const Engine::State);
|
||||
|
||||
@@ -69,7 +69,7 @@ class SystemTrayIcon : public QSystemTrayIcon {
|
||||
void UpdateIcon();
|
||||
|
||||
signals:
|
||||
void ChangeVolume(int delta);
|
||||
void ChangeVolume(const int delta);
|
||||
void SeekForward();
|
||||
void SeekBackward();
|
||||
void NextTrack();
|
||||
|
||||
@@ -89,7 +89,7 @@ class SongLoader : public QObject {
|
||||
|
||||
signals:
|
||||
void AudioCDTracksLoadFinished();
|
||||
void LoadAudioCDFinished(bool success);
|
||||
void LoadAudioCDFinished(const bool success);
|
||||
void LoadRemoteFinished();
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -91,7 +91,7 @@ class UrlHandler : public QObject {
|
||||
virtual LoadResult StartLoading(const QUrl &url) { return LoadResult(url); }
|
||||
|
||||
signals:
|
||||
void AsyncLoadComplete(UrlHandler::LoadResult result);
|
||||
void AsyncLoadComplete(const UrlHandler::LoadResult &result);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user