summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-29 20:58:39 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-10-29 20:58:39 +0100
commit91da8fbcaa2e1ca0cd89fdf3466c4a220781af50 (patch)
treeda71f6a4028fde2aa5a7767925d2b9b35fa3eabf /gui
parent1d994c21ff978daeb8ae72a5ab4b0fad287b9959 (diff)
gui: fix module on main screen not saved
Diffstat (limited to 'gui')
-rw-r--r--gui/main-window.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index c62e0ae3..87a7ad8e 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -150,22 +150,26 @@ MainWindow::MainWindow() :
connect(ui.iconcomboTrackerSource,
&QComboBox::currentTextChanged,
this,
- [&](const QString&) { if (pTrackerDialog) pTrackerDialog = nullptr; save_modules(); });
+ [&](const QString&) { if (pTrackerDialog) pTrackerDialog = nullptr; });
connect(ui.iconcomboTrackerSource,
&QComboBox::currentTextChanged,
this,
- [&](const QString&) { if (pProtocolDialog) pProtocolDialog = nullptr; save_modules(); });
+ [&](const QString&) { if (pProtocolDialog) pProtocolDialog = nullptr; });
connect(ui.iconcomboTrackerSource,
&QComboBox::currentTextChanged,
this,
- [&](const QString&) { if (pFilterDialog) pFilterDialog = nullptr; save_modules(); });
- }
+ [&](const QString&) { if (pFilterDialog) pFilterDialog = nullptr; });
+
+ connect(&m.tracker_dll, base_value::signal_fun<QString>(), this, &MainWindow::save_modules, Qt::QueuedConnection);
+ connect(&m.protocol_dll, base_value::signal_fun<QString>(), this, &MainWindow::save_modules, Qt::QueuedConnection);
+ connect(&m.filter_dll, base_value::signal_fun<QString>(), this, &MainWindow::save_modules, Qt::QueuedConnection);
- tie_setting(m.tracker_dll, ui.iconcomboTrackerSource);
- tie_setting(m.protocol_dll, ui.iconcomboProtocol);
- tie_setting(m.filter_dll, ui.iconcomboFilter);
+ tie_setting(m.tracker_dll, ui.iconcomboTrackerSource);
+ tie_setting(m.protocol_dll, ui.iconcomboProtocol);
+ tie_setting(m.filter_dll, ui.iconcomboFilter);
+ }
connect(this, &MainWindow::start_tracker,
this, [&]() -> void { qDebug() << "start tracker"; start_tracker_(); },
@@ -364,6 +368,7 @@ void MainWindow::set_working_directory()
void MainWindow::save_modules()
{
+ qDebug() << "save modules";
m.b->save();
}