diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-27 11:40:33 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-27 11:42:28 +0100 |
commit | 303c83792cd034fc2bf40e71edde968c22df5324 (patch) | |
tree | 13df052f49cff97f1cb304de571c74a76bbe6a9b /api/plugin-api.cpp | |
parent | ea145f8c1cc188f20e066af78e4167036b3993de (diff) |
{base,options}-dialog: fix dialogs not savingopentrack-2.3.1_fix2
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.
Diffstat (limited to 'api/plugin-api.cpp')
-rw-r--r-- | api/plugin-api.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
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(); + } +} |