Skip to content

Commit

Permalink
Fix currentPage QPROPERTY missing NOTIFY in settingsdialog class
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
  • Loading branch information
claucambra authored and mgallien committed Jan 2, 2023
1 parent 0495c65 commit 403f43b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/gui/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent)
auto *networkSettings = new NetworkSettings;
_ui->stack->addWidget(networkSettings);

connect(_ui->stack, &QStackedWidget::currentChanged, this, &SettingsDialog::currentPageChanged);

_actionGroupWidgets.insert(generalAction, generalSettings);
_actionGroupWidgets.insert(networkAction, networkSettings);

Expand Down
3 changes: 2 additions & 1 deletion src/gui/settingsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ownCloudGui;
class SettingsDialog : public QDialog
{
Q_OBJECT
Q_PROPERTY(QWidget* currentPage READ currentPage)
Q_PROPERTY(QWidget* currentPage READ currentPage NOTIFY currentPageChanged)

public:
explicit SettingsDialog(ownCloudGui *gui, QWidget *parent = nullptr);
Expand All @@ -63,6 +63,7 @@ public slots:
signals:
void styleChanged();
void onActivate();
void currentPageChanged();

protected:
void reject() override;
Expand Down

0 comments on commit 403f43b

Please sign in to comment.