From 303c83792cd034fc2bf40e71edde968c22df5324 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Feb 2017 11:40:33 +0100 Subject: {base,options}-dialog: fix dialogs not saving In case of the options dialog, running close() in doOK() made it go into closeEvent(), going into doCancel(), and reloading the settings prior to them getting saved. It's time for a hotfix2 build. --- api/plugin-api.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'api') diff --git a/api/plugin-api.cpp b/api/plugin-api.cpp index 92602b11..20c24e62 100644 --- a/api/plugin-api.cpp +++ b/api/plugin-api.cpp @@ -1,5 +1,7 @@ #include "plugin-api.hpp" +using namespace plugin_api::detail; + // these exist so that vtable is emitted in a single compilation unit, not all of them. Metadata::~Metadata() {} @@ -10,9 +12,9 @@ IProtocolDialog::~IProtocolDialog() {} ITracker::~ITracker() {} ITrackerDialog::~ITrackerDialog() {} -plugin_api::detail::BaseDialog::BaseDialog() {} +BaseDialog::BaseDialog() {} -void plugin_api::detail::BaseDialog::closeEvent(QCloseEvent*) +void BaseDialog::closeEvent(QCloseEvent*) { if (isVisible()) { @@ -29,4 +31,11 @@ IProtocolDialog::IProtocolDialog() {} ITracker::ITracker() {} ITrackerDialog::ITrackerDialog() {} -void plugin_api::detail::BaseDialog::done(int) { close(); hide(); } +void BaseDialog::done(int) +{ + if (isVisible()) + { + hide(); + close(); + } +} -- cgit v1.2.3