Skip to content

Commit

Permalink
fix: the dialog type window will be closed after pressing Super+D
Browse files Browse the repository at this point in the history
Change-Id: Iaae3193cc3dccde311dbf7c3129558c2d507a1f9
  • Loading branch information
zccrs committed Nov 19, 2018
1 parent 2af710b commit 251418b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/widgets/ddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,10 +996,17 @@ void DDialog::showEvent(QShowEvent *event)
/*!\reimp */
void DDialog::hideEvent(QHideEvent *event)
{
Q_EMIT aboutToClose();

DAbstractDialog::hideEvent(event);

Q_EMIT visibleChanged(isVisible());
}

void DDialog::closeEvent(QCloseEvent *event)
{
Q_UNUSED(event)

Q_EMIT aboutToClose();

done(-1);

Q_EMIT visibleChanged(isVisible());
Expand Down
1 change: 1 addition & 0 deletions src/widgets/ddialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public Q_SLOTS:

void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE;
void closeEvent(QCloseEvent *event) override;
void childEvent(QChildEvent *event) Q_DECL_OVERRIDE;
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;

Expand Down

0 comments on commit 251418b

Please sign in to comment.