From cd9bb483fe8557064fad1bbcadbca66257a8cf56 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sat, 1 Nov 2025 10:07:15 -0400 Subject: [PATCH] Fix saving "Search Wait for Enter" setting --- src/core/Config.cpp | 1 + src/core/Config.h | 2 +- src/gui/SearchWidget.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/Config.cpp b/src/core/Config.cpp index 0a0815661..16a54fbcd 100644 --- a/src/core/Config.cpp +++ b/src/core/Config.cpp @@ -118,6 +118,7 @@ static const QHash configStrings = { {Config::GUI_CheckForUpdates, {QS("GUI/CheckForUpdates"), Roaming, true}}, {Config::GUI_CheckForUpdatesNextCheck, {QS("GUI/CheckForUpdatesNextCheck"), Local, 0}}, {Config::GUI_CheckForUpdatesIncludeBetas, {QS("GUI/CheckForUpdatesIncludeBetas"), Roaming, false}}, + {Config::GUI_SearchWaitForEnter, {QS("GUI/SearchWaitForEnter"), Roaming, false}}, {Config::GUI_ShowExpiredEntriesOnDatabaseUnlock, {QS("GUI/ShowExpiredEntriesOnDatabaseUnlock"), Roaming, true}}, {Config::GUI_ShowExpiredEntriesOnDatabaseUnlockOffsetDays, {QS("GUI/ShowExpiredEntriesOnDatabaseUnlockOffsetDays"), Roaming, 3}}, {Config::GUI_FontSizeOffset, {QS("GUI/FontSizeOffset"), Local, 0}}, diff --git a/src/core/Config.h b/src/core/Config.h index f08ea72fd..d1809e415 100644 --- a/src/core/Config.h +++ b/src/core/Config.h @@ -99,7 +99,7 @@ public: GUI_CompactMode, GUI_CheckForUpdates, GUI_CheckForUpdatesIncludeBetas, - SearchWaitForEnter, + GUI_SearchWaitForEnter, GUI_ShowExpiredEntriesOnDatabaseUnlock, GUI_ShowExpiredEntriesOnDatabaseUnlockOffsetDays, GUI_FontSizeOffset, diff --git a/src/gui/SearchWidget.cpp b/src/gui/SearchWidget.cpp index d4135ed09..13c08318a 100644 --- a/src/gui/SearchWidget.cpp +++ b/src/gui/SearchWidget.cpp @@ -72,10 +72,10 @@ SearchWidget::SearchWidget(QWidget* parent) m_actionLimitGroup->setChecked(config()->get(Config::SearchLimitGroup).toBool()); m_actionWaitForEnter = m_searchMenu->addAction( - tr("Press Enter to search"), this, [](bool state) { config()->set(Config::SearchWaitForEnter, state); }); + tr("Press Enter to search"), this, [](bool state) { config()->set(Config::GUI_SearchWaitForEnter, state); }); m_actionWaitForEnter->setObjectName("actionSearchWaitForEnter"); m_actionWaitForEnter->setCheckable(true); - m_actionWaitForEnter->setChecked(config()->get(Config::SearchWaitForEnter).toBool()); + m_actionWaitForEnter->setChecked(config()->get(Config::GUI_SearchWaitForEnter).toBool()); m_ui->searchIcon->setIcon(icons()->icon("system-search")); m_ui->searchEdit->addAction(m_ui->searchIcon, QLineEdit::LeadingPosition);