From 403f43b3e88a25c889387f1d3ea33c881d1212be Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 19 Dec 2022 14:14:38 +0100 Subject: [PATCH] Fix currentPage QPROPERTY missing NOTIFY in settingsdialog class Signed-off-by: Claudio Cambra --- src/gui/settingsdialog.cpp | 2 ++ src/gui/settingsdialog.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 18e267165..ad6f9ea39 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -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); diff --git a/src/gui/settingsdialog.h b/src/gui/settingsdialog.h index 21b6752d2..6034e21bb 100644 --- a/src/gui/settingsdialog.h +++ b/src/gui/settingsdialog.h @@ -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); @@ -63,6 +63,7 @@ public slots: signals: void styleChanged(); void onActivate(); + void currentPageChanged(); protected: void reject() override;