From 2b7c90527f18be84999ca7c99a31e0cca0b7d296 Mon Sep 17 00:00:00 2001 From: Stéphane Lenclud Date: Thu, 2 May 2019 21:25:06 +0200 Subject: Fix crash when closing dialogs with X or Cancel button. --- api/plugin-api.cpp | 10 ++++------ 1 file 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()) -- cgit v1.2.3