Replace slots with Q_SLOTS

This commit is contained in:
Jonas Kvinge
2024-08-12 01:06:15 +02:00
parent f624b7a331
commit cbce9892d5
209 changed files with 277 additions and 277 deletions

View File

@@ -43,7 +43,7 @@ class AutoExpandingTreeView : public QTreeView {
void SetExpandOnReset(bool v) { expand_on_reset_ = v; }
void SetAddOnDoubleClick(bool v) { add_on_double_click_ = v; }
public slots:
public Q_SLOTS:
void RecursivelyExpandSlot(const QModelIndex &idx);
void UpAndFocus();
void DownAndFocus();
@@ -63,7 +63,7 @@ class AutoExpandingTreeView : public QTreeView {
virtual bool CanRecursivelyExpand(const QModelIndex &idx) const { Q_UNUSED(idx); return true; }
private slots:
private Q_SLOTS:
void ItemExpanded(const QModelIndex &idx);
void ItemClicked(const QModelIndex &idx);
void ItemDoubleClicked(const QModelIndex &idx);

View File

@@ -69,11 +69,11 @@ class FancyTabWidget : public QTabWidget {
void SetBackgroundPixmap(const QPixmap &pixmap);
int IndexOfTab(QWidget *widget);
public slots:
public Q_SLOTS:
void SetMode(const Mode mode);
void SetCurrentIndex(int idx);
private slots:
private Q_SLOTS:
void TabBarUpdateGeometry();
void CurrentTabChangedSlot(const int idx);

View File

@@ -72,7 +72,7 @@ class FileView : public QWidget {
void CopyToDevice(const QList<QUrl> &urls);
void EditTags(const QList<QUrl> &urls);
private slots:
private Q_SLOTS:
void FileUp();
void FileHome();
void ChangeFilePath(const QString &new_path);

View File

@@ -63,7 +63,7 @@ class FileViewList : public QListView {
QList<QUrl> UrlListFromSelection() const;
MimeData *MimeDataFromSelection() const;
private slots:
private Q_SLOTS:
void LoadSlot();
void AddToPlaylistSlot();
void OpenInNewPlaylistSlot();

View File

@@ -96,7 +96,7 @@ class GroupedIconView : public QListView {
QRect visualRect(const QModelIndex &idx) const override;
QRegion visualRegionForSelection(const QItemSelection &selection) const override;
private slots:
private Q_SLOTS:
void LayoutItems();
private:

View File

@@ -125,7 +125,7 @@ class LineEdit : public QLineEdit, public ExtendedEditor {
QVariant value() const override { return QLineEdit::text(); }
void set_value(const QVariant &value) override { QLineEdit::setText(value.toString()); }
public slots:
public Q_SLOTS:
void set_focus() override { QLineEdit::setFocus(); }
void clear() override { QLineEdit::clear(); }
@@ -137,7 +137,7 @@ class LineEdit : public QLineEdit, public ExtendedEditor {
bool is_rtl() const { return is_rtl_; }
void set_rtl(bool rtl) { is_rtl_ = rtl; }
private slots:
private Q_SLOTS:
void text_changed(const QString &text);
Q_SIGNALS:
@@ -159,7 +159,7 @@ class TextEdit : public QPlainTextEdit, public ExtendedEditor {
QVariant value() const override { return QPlainTextEdit::toPlainText(); }
void set_value(const QVariant &value) override { QPlainTextEdit::setPlainText(value.toString()); }
public slots:
public Q_SLOTS:
void set_focus() override { QPlainTextEdit::setFocus(); }
void clear() override { QPlainTextEdit::clear(); }
@@ -190,7 +190,7 @@ class SpinBox : public QSpinBox, public ExtendedEditor {
void set_value(const QVariant &value) override { QSpinBox::setValue(value.toInt()); }
bool is_empty() const override { return text().isEmpty() || text() == QStringLiteral("0"); }
public slots:
public Q_SLOTS:
void set_focus() override { QSpinBox::setFocus(); }
void clear() override { QSpinBox::clear(); }
@@ -219,7 +219,7 @@ class CheckBox : public QCheckBox, public ExtendedEditor {
void set_value(const QVariant &value) override { QCheckBox::setCheckState(value.toBool() ? Qt::Checked : Qt::Unchecked); }
void set_partially() override { QCheckBox::setCheckState(Qt::PartiallyChecked); }
public slots:
public Q_SLOTS:
void set_focus() override { QCheckBox::setFocus(); }
void clear() override { QCheckBox::setChecked(false); }
@@ -246,7 +246,7 @@ class RatingBox : public RatingWidget, public ExtendedEditor {
void set_partially() override { RatingWidget::set_rating(0.0F); }
public slots:
public Q_SLOTS:
void set_focus() override { RatingWidget::setFocus(); }
void clear() override {}

View File

@@ -54,7 +54,7 @@ class LoginStateWidget : public QWidget {
// QObject
bool eventFilter(QObject *object, QEvent *event) override;
public slots:
public Q_SLOTS:
// Changes the "You are logged in/out" label, shows/hides any QGroupBoxes added with AddCredentialGroup.
void SetLoggedIn(const LoginStateWidget::State state, const QString &account_name = QString());
@@ -70,7 +70,7 @@ class LoginStateWidget : public QWidget {
void LogoutClicked();
void LoginClicked();
private slots:
private Q_SLOTS:
void Logout();
void FocusLastCredentialField();

View File

@@ -49,7 +49,7 @@ class MultiLoadingIndicator : public QWidget {
protected:
void paintEvent(QPaintEvent*) override;
private slots:
private Q_SLOTS:
void UpdateText();
private:

View File

@@ -68,7 +68,7 @@ class PlayingWidget : public QWidget {
Q_SIGNALS:
void ShowAboveStatusBarChanged(const bool above);
public slots:
public Q_SLOTS:
void Playing();
void Stopped();
void Error();
@@ -90,7 +90,7 @@ class PlayingWidget : public QWidget {
LargeSongDetails = 1
};
private slots:
private Q_SLOTS:
void Update() { update(); }
void SetMode(const Mode mode);
void ShowAboveStatusBar(const bool above);

View File

@@ -25,7 +25,7 @@ class QSearchField : public QWidget {
#endif
void setFocus(Qt::FocusReason);
public slots:
public Q_SLOTS:
void setText(const QString &new_text);
void setPlaceholderText(const QString &text);
void clear();

View File

@@ -65,7 +65,7 @@ class StretchHeaderView : public QHeaderView {
// width is the proportion of the entire width from 0.0 to 1.0.
void SetColumnWidth(const int logical_index, const ColumnWidthType width);
public slots:
public Q_SLOTS:
// Changes the stretch mode.
// Enabling stretch mode will initialize the proportional column widths from the current state of the header.
void ToggleStretchEnabled();
@@ -87,7 +87,7 @@ class StretchHeaderView : public QHeaderView {
// Resizes the actual columns to make them match the proportional values in column_widths_.
void ResizeSections(const QList<int> &sections = QList<int>());
private slots:
private Q_SLOTS:
void SectionResized(const int logical, const int old_size, const int new_size);
private:

View File

@@ -56,7 +56,7 @@ class TrackSlider : public QWidget {
MoodbarProxyStyle *moodbar_style() const { return moodbar_style_; }
#endif
public slots:
public Q_SLOTS:
void SetValue(const int elapsed, const int total);
void SetStopped();
void SetCanSeek(const bool can_seek);
@@ -71,7 +71,7 @@ class TrackSlider : public QWidget {
void Next();
void Previous();
private slots:
private Q_SLOTS:
void ValueMaybeChanged(const int value);
void ToggleTimeDisplay();

View File

@@ -39,7 +39,7 @@ class TrackSliderPopup : public QWidget {
public:
explicit TrackSliderPopup(QWidget *parent);
public slots:
public Q_SLOTS:
void SetText(const QString &text);
void SetSmallText(const QString &small_text);
void SetPopupPosition(const QPoint pos);

View File

@@ -62,7 +62,7 @@ class TrackSliderSlider : public QSlider {
void leaveEvent(QEvent *e) override;
void keyPressEvent(QKeyEvent *event) override;
private slots:
private Q_SLOTS:
void UpdateDeltaTime();
private:

View File

@@ -64,7 +64,7 @@ class VolumeSlider : public SliderSlider {
void mousePressEvent(QMouseEvent*) override;
void wheelEvent(QWheelEvent *e) override;
private slots:
private Q_SLOTS:
virtual void slotAnimTimer();
private: