From eee66b91fe096ef3d703d661e358317304083574 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 11 Nov 2024 13:40:23 +0800 Subject: [PATCH] Emit a signal on wizard close Signed-off-by: Claudio Cambra Signed-off-by: Rainer Walke --- src/gui/wizard/owncloudwizard.cpp | 6 ++++++ src/gui/wizard/owncloudwizard.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp index f09c52fcaf155..1f4fd9b313c55 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp @@ -408,6 +408,12 @@ void OwncloudWizard::changeEvent(QEvent *e) QWizard::changeEvent(e); } +void OwncloudWizard::closeEvent(QCloseEvent *event) +{ + emit wizardClosed(); + QWizard::closeEvent(event); +} + void OwncloudWizard::customizeStyle() { // HINT: Customize wizard's own style here, if necessary in the future (Dark-/Light-Mode switching) diff --git a/src/gui/wizard/owncloudwizard.h b/src/gui/wizard/owncloudwizard.h index 7f69587a45da7..d184d9978911d 100644 --- a/src/gui/wizard/owncloudwizard.h +++ b/src/gui/wizard/owncloudwizard.h @@ -110,9 +110,11 @@ public slots: void needCertificate(); void styleChanged(); void onActivate(); + void wizardClosed(); protected: void changeEvent(QEvent *) override; + void closeEvent(QCloseEvent *) override; private: void customizeStyle();