summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/preferences/preferencesdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/preferences/preferencesdialog.cpp')
-rw-r--r--desktop-widgets/preferences/preferencesdialog.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/desktop-widgets/preferences/preferencesdialog.cpp b/desktop-widgets/preferences/preferencesdialog.cpp
index 6ad91acec..1164c5de3 100644
--- a/desktop-widgets/preferences/preferencesdialog.cpp
+++ b/desktop-widgets/preferences/preferencesdialog.cpp
@@ -84,6 +84,7 @@ PreferencesDialog::PreferencesDialog()
pagesList->addItem(item);
pagesStack->addWidget(page);
page->refreshSettings();
+ connect(page, &AbstractPreferencesWidget::settingsChanged, &diveListNotifier, &DiveListNotifier::settingsChanged);
}
connect(pagesList, &QListWidget::currentRowChanged,
@@ -116,10 +117,8 @@ void PreferencesDialog::refreshPages()
void PreferencesDialog::applyRequested(bool closeIt)
{
- Q_FOREACH(AbstractPreferencesWidget *page, pages) {
- connect(page, &AbstractPreferencesWidget::settingsChanged, &diveListNotifier, &DiveListNotifier::settingsChanged, Qt::UniqueConnection);
+ for (AbstractPreferencesWidget *page: pages)
page->syncSettings();
- }
emit diveListNotifier.settingsChanged();
if (closeIt)
accept();