Add const/references to all signal parameters

This commit is contained in:
Jonas Kvinge
2023-04-09 20:23:42 +02:00
parent fa856ee905
commit aaa530e72b
102 changed files with 296 additions and 297 deletions

View File

@@ -78,8 +78,8 @@ class FancyTabWidget : public QTabWidget {
int iconsize_largesidebar() const { return iconsize_largesidebar_; }
signals:
void ModeChanged(FancyTabWidget::Mode mode);
void CurrentChanged(int);
void ModeChanged(const FancyTabWidget::Mode mode);
void CurrentChanged(const int);
public slots:
void setCurrentIndex(int idx);

View File

@@ -44,7 +44,7 @@ class FavoriteWidget : public QWidget {
QSize sizeHint() const override;
signals:
void FavoriteStateChanged(int, bool);
void FavoriteStateChanged(const int, const bool);
protected:
void paintEvent(QPaintEvent *e) override;

View File

@@ -64,13 +64,13 @@ class FileView : public QWidget {
void keyPressEvent(QKeyEvent *e) override;
signals:
void PathChanged(QString path);
void PathChanged(const QString &path);
void AddToPlaylist(QMimeData *data);
void CopyToCollection(QList<QUrl> urls);
void MoveToCollection(QList<QUrl> urls);
void CopyToDevice(QList<QUrl> urls);
void EditTags(QList<QUrl> urls);
void CopyToCollection(const QList<QUrl> &urls);
void MoveToCollection(const QList<QUrl> &urls);
void CopyToDevice(const QList<QUrl> &urls);
void EditTags(const QList<QUrl> &urls);
private slots:
void FileUp();

View File

@@ -47,11 +47,11 @@ class FileViewList : public QListView {
signals:
void AddToPlaylist(QMimeData *data);
void CopyToCollection(QList<QUrl> urls);
void MoveToCollection(QList<QUrl> urls);
void CopyToDevice(QList<QUrl> urls);
void Delete(QStringList filenames);
void EditTags(QList<QUrl> urls);
void CopyToCollection(const QList<QUrl> &urls);
void MoveToCollection(const QList<QUrl> &urls);
void CopyToDevice(const QList<QUrl> &urls);
void Delete(const QStringList &filenames);
void EditTags(const QList<QUrl> &urls);
void Back();
void Forward();

View File

@@ -46,7 +46,7 @@ class MultiLoadingIndicator : public QWidget {
QSize sizeHint() const override;
signals:
void TaskCountChange(int tasks);
void TaskCountChange(const int tasks);
protected:
void paintEvent(QPaintEvent*) override;

View File

@@ -68,7 +68,7 @@ class PlayingWidget : public QWidget {
bool show_above_status_bar() const { return above_statusbar_action_->isChecked(); }
signals:
void ShowAboveStatusBarChanged(bool above);
void ShowAboveStatusBarChanged(const bool above);
public slots:
void Playing();

View File

@@ -36,7 +36,7 @@ class QSearchField : public QWidget {
void setFocus();
signals:
void textChanged(QString text);
void textChanged(const QString &text);
void editingFinished();
void returnPressed();

View File

@@ -55,7 +55,7 @@ class RatingWidget : public QWidget {
void set_rating(const float rating);
signals:
void RatingChanged(float);
void RatingChanged(const float rating);
protected:
void paintEvent(QPaintEvent*) override;

View File

@@ -42,7 +42,7 @@ class SliderSlider : public QSlider {
signals:
// We emit this when the user has specifically changed the slider so connect to it if valueChanged() is too generic Qt also emits valueChanged(int)
void SliderReleased(int);
void SliderReleased(const int);
protected:
virtual void slideEvent(QMouseEvent*);

View File

@@ -76,7 +76,7 @@ class StretchHeaderView : public QHeaderView {
signals:
// Emitted when the stretch mode is changed.
void StretchEnabledChanged(bool enabled);
void StretchEnabledChanged(const bool enabled);
protected:
// QWidget

View File

@@ -65,8 +65,8 @@ class TrackSlider : public QWidget {
void Seek(const int gap);
signals:
void ValueChanged(int value);
void ValueChangedSeconds(quint64 value);
void ValueChanged(const int value);
void ValueChangedSeconds(const quint64 value);
void SeekForward();
void SeekBackward();