Skip to content

Commit

Permalink
Also emit close signal on window hide (i.e. user close) on macOS
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Nov 11, 2024
1 parent 62c1363 commit 184a8e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/wizard/owncloudwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,15 @@ void OwncloudWizard::changeEvent(QEvent *e)
QWizard::changeEvent(e);
}

void OwncloudWizard::hideEvent(QHideEvent *event)
{
QWizard::hideEvent(event);
#ifdef Q_OS_MACOS
// Closing the window on macOS hides it rather than closes it, so emit a wizardClosed here
emit wizardClosed();
#endif
}

void OwncloudWizard::closeEvent(QCloseEvent *event)
{
emit wizardClosed();
Expand Down
1 change: 1 addition & 0 deletions src/gui/wizard/owncloudwizard.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public slots:

protected:
void changeEvent(QEvent *) override;
void hideEvent(QHideEvent *) override;
void closeEvent(QCloseEvent *) override;

private:
Expand Down

0 comments on commit 184a8e2

Please sign in to comment.