diff options
author | Stéphane Lenclud <github@lenclud.com> | 2019-05-02 21:25:06 +0200 |
---|---|---|
committer | Stéphane Lenclud <github@lenclud.com> | 2019-05-02 21:25:06 +0200 |
commit | 2b7c90527f18be84999ca7c99a31e0cca0b7d296 (patch) | |
tree | 419b93d682ca6946df277c0c18fb23f7e705a7fb | |
parent | 03092469c8c84e03f9099a0d147217561706a1e8 (diff) |
Fix crash when closing dialogs with X or Cancel button.fix-cancel-dialog-crash
-rw-r--r-- | api/plugin-api.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/api/plugin-api.cpp b/api/plugin-api.cpp index 79f9b464..ee1cbb91 100644 --- a/api/plugin-api.cpp +++ b/api/plugin-api.cpp @@ -5,15 +5,13 @@ namespace plugin_api::detail { BaseDialog::BaseDialog() = default; -void BaseDialog::closeEvent(QCloseEvent*) + +void BaseDialog::closeEvent(QCloseEvent* aEvent) { - if (isVisible()) - { - hide(); - emit closing(); - } + QDialog::closeEvent(aEvent); } + void BaseDialog::done(int) { if (isVisible()) |