Add missing names for parameter variables

This commit is contained in:
Jonas Kvinge
2024-09-28 12:32:12 +02:00
parent f2e28d18bc
commit 3cb0f60900
73 changed files with 365 additions and 164 deletions

View File

@@ -72,11 +72,13 @@ BusyIndicator::~BusyIndicator() {
delete movie_;
}
void BusyIndicator::showEvent(QShowEvent*) {
void BusyIndicator::showEvent(QShowEvent *e) {
Q_UNUSED(e)
movie_->start();
}
void BusyIndicator::hideEvent(QHideEvent*) {
void BusyIndicator::hideEvent(QHideEvent *e) {
Q_UNUSED(e)
movie_->stop();
}

View File

@@ -44,8 +44,8 @@ class BusyIndicator : public QWidget {
void set_text(const QString &text);
protected:
void showEvent(QShowEvent *event) override;
void hideEvent(QHideEvent *event) override;
void showEvent(QShowEvent *e) override;
void hideEvent(QHideEvent *e) override;
private:
void Init(const QString &text);

View File

@@ -77,7 +77,7 @@ FancyTabWidget::FancyTabWidget(QWidget *parent)
}
FancyTabWidget::~FancyTabWidget() {}
FancyTabWidget::~FancyTabWidget() = default;
void FancyTabWidget::AddTab(QWidget *widget_view, const QString &name, const QIcon &icon, const QString &label) {

View File

@@ -72,7 +72,9 @@ void FavoriteWidget::paintEvent(QPaintEvent *e) {
}
void FavoriteWidget::mouseDoubleClickEvent(QMouseEvent*) {
void FavoriteWidget::mouseDoubleClickEvent(QMouseEvent *e) {
Q_UNUSED(e)
favorite_ = !favorite_;
update();

View File

@@ -48,7 +48,7 @@ class FavoriteWidget : public QWidget {
protected:
void paintEvent(QPaintEvent *e) override;
void mouseDoubleClickEvent(QMouseEvent*) override;
void mouseDoubleClickEvent(QMouseEvent *e) override;
private:
// The playlist's id this widget belongs to

View File

@@ -80,7 +80,9 @@ QSize FreeSpaceBar::sizeHint() const {
return QSize(150, kBarHeight + kLabelBoxPadding + fontMetrics().height());
}
void FreeSpaceBar::paintEvent(QPaintEvent*) {
void FreeSpaceBar::paintEvent(QPaintEvent *e) {
Q_UNUSED(e)
// Geometry
QRect bar_rect(rect());

View File

@@ -50,7 +50,7 @@ class FreeSpaceBar : public QWidget {
QSize sizeHint() const override;
protected:
void paintEvent(QPaintEvent*) override;
void paintEvent(QPaintEvent *e) override;
private:
struct Label {

View File

@@ -132,9 +132,13 @@ void GroupedIconView::rowsInserted(const QModelIndex &parent, int start, int end
LayoutItems();
}
void GroupedIconView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList<int>&) {
QListView::dataChanged(topLeft, bottomRight);
void GroupedIconView::dataChanged(const QModelIndex &top_left, const QModelIndex &bottom_right, const QList<int> &roles) {
Q_UNUSED(roles)
QListView::dataChanged(top_left, bottom_right);
LayoutItems();
}
void GroupedIconView::LayoutItems() {
@@ -363,7 +367,9 @@ QRegion GroupedIconView::visualRegionForSelection(const QItemSelection &selectio
}
QModelIndex GroupedIconView::moveCursor(CursorAction action, Qt::KeyboardModifiers) {
QModelIndex GroupedIconView::moveCursor(CursorAction action, const Qt::KeyboardModifiers keyboard_modifiers) {
Q_UNUSED(keyboard_modifiers)
if (model()->rowCount() == 0) {
return QModelIndex();

View File

@@ -76,7 +76,7 @@ class GroupedIconView : public QListView {
void set_header_text(const QString &value) { header_text_ = value; }
// QAbstractItemView
QModelIndex moveCursor(CursorAction action, Qt::KeyboardModifiers modifiers) override;
QModelIndex moveCursor(CursorAction action, const Qt::KeyboardModifiers keyboard_modifiers) override;
void setModel(QAbstractItemModel *model) override;
static void DrawHeader(QPainter *painter, const QRect rect, const QFont &font, const QPalette &palette, const QString &text);
@@ -89,7 +89,7 @@ class GroupedIconView : public QListView {
void resizeEvent(QResizeEvent *e) override;
// QAbstractItemView
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList<int>& = QList<int>()) override;
void dataChanged(const QModelIndex &top_left, const QModelIndex &bottom_right, const QList<int> &roles = QList<int>()) override;
QModelIndex indexAt(const QPoint &p) const override;
void rowsInserted(const QModelIndex &parent, int start, int end) override;
void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) override;

View File

@@ -98,7 +98,9 @@ void MultiLoadingIndicator::UpdateText() {
}
void MultiLoadingIndicator::paintEvent(QPaintEvent*) {
void MultiLoadingIndicator::paintEvent(QPaintEvent *e) {
Q_UNUSED(e)
QPainter p(this);

View File

@@ -47,7 +47,7 @@ class MultiLoadingIndicator : public QWidget {
void TaskCountChange(const int tasks);
protected:
void paintEvent(QPaintEvent*) override;
void paintEvent(QPaintEvent *e) override;
private Q_SLOTS:
void UpdateText();

View File

@@ -128,7 +128,9 @@ void RatingWidget::set_rating(const float rating) {
}
void RatingWidget::paintEvent(QPaintEvent*) {
void RatingWidget::paintEvent(QPaintEvent *e) {
Q_UNUSED(e)
QStylePainter p(this);
@@ -161,7 +163,9 @@ void RatingWidget::mouseMoveEvent(QMouseEvent *e) {
}
void RatingWidget::leaveEvent(QEvent*) {
void RatingWidget::leaveEvent(QEvent *e) {
Q_UNUSED(e)
hover_rating_ = -1.0;
update();

View File

@@ -62,7 +62,7 @@ class RatingWidget : public QWidget {
void paintEvent(QPaintEvent*) override;
void mousePressEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void leaveEvent(QEvent*) override;
void leaveEvent(QEvent *e) override;
private:
RatingPainter painter_;

View File

@@ -121,7 +121,9 @@ void SliderSlider::mousePressEvent(QMouseEvent *e) {
}
void SliderSlider::mouseReleaseEvent(QMouseEvent*) {
void SliderSlider::mouseReleaseEvent(QMouseEvent *e) {
Q_UNUSED(e)
if (!outside_ && QSlider::value() != prev_value_) {
Q_EMIT SliderReleased(value());

View File

@@ -47,7 +47,7 @@ class StretchHeaderView : public QHeaderView {
// Serialises the proportional and actual column widths.
// Use these instead of QHeaderView::restoreState and QHeaderView::saveState to persist the proportional values directly and avoid floating point errors over time.
bool RestoreState(const QByteArray &sdata);
bool RestoreState(const QByteArray &state);
QByteArray SaveState() const;
QByteArray ResetState();

View File

@@ -75,7 +75,8 @@ void TrackSliderPopup::SetPopupPosition(const QPoint pos) {
UpdatePosition();
}
void TrackSliderPopup::paintEvent(QPaintEvent*) {
void TrackSliderPopup::paintEvent(QPaintEvent *e) {
Q_UNUSED(e)
QPainter p(this);
p.drawPixmap(0, 0, pixmap_);
}

View File

@@ -94,7 +94,9 @@ void VolumeSlider::HandleWheel(const int delta) {
}
void VolumeSlider::paintEvent(QPaintEvent*) {
void VolumeSlider::paintEvent(QPaintEvent *e) {
Q_UNUSED(e)
QPainter p(this);
@@ -162,7 +164,8 @@ void VolumeSlider::slotAnimTimer() {
}
void VolumeSlider::paletteChange(const QPalette&) {
void VolumeSlider::paletteChange(const QPalette &palette) {
Q_UNUSED(palette)
generateGradient();
}
@@ -229,7 +232,9 @@ void VolumeSlider::drawVolumeSliderHandle() {
}
void VolumeSlider::enterEvent(QEnterEvent*) {
void VolumeSlider::enterEvent(QEnterEvent *e) {
Q_UNUSED(e)
anim_enter_ = true;
anim_count_ = 0;
@@ -238,7 +243,9 @@ void VolumeSlider::enterEvent(QEnterEvent*) {
}
void VolumeSlider::leaveEvent(QEvent*) {
void VolumeSlider::leaveEvent(QEvent *e) {
Q_UNUSED(e)
// This can happen if you enter and leave the widget quickly
if (anim_count_ == 0) anim_count_ = 1;

View File

@@ -48,12 +48,12 @@ class VolumeSlider : public SliderSlider {
void HandleWheel(const int delta);
protected:
void enterEvent(QEnterEvent*) override;
void leaveEvent(QEvent*) override;
void paintEvent(QPaintEvent*) override;
virtual void paletteChange(const QPalette&);
void slideEvent(QMouseEvent*) override;
void contextMenuEvent(QContextMenuEvent*) override;
void enterEvent(QEnterEvent *e) override;
void leaveEvent(QEvent *e) override;
void paintEvent(QPaintEvent *e) override;
virtual void paletteChange(const QPalette &palette);
void slideEvent(QMouseEvent *e) override;
void contextMenuEvent(QContextMenuEvent *e) override;
void mousePressEvent(QMouseEvent*) override;
void wheelEvent(QWheelEvent *e) override;