Fixup saving non-data changes on database lock

* Fix #5107 
* Change setting for non-data changes to Auto save on database lock (or not) instead of marking modified.
* When enabled, database will be auto-saved if there are only non-data changes, but will not prompt the user if saving has failed.
* When disabled, database will not auto-save if there are only non-data changes (same behavior as 2.5 and below) and will not mark the database dirty.
This commit is contained in:
Jonathan White 2020-08-01 18:00:47 -04:00
parent fd7daf4c89
commit c538f0b907
10 changed files with 66 additions and 74 deletions

View file

@ -58,6 +58,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
{Config::AutoSaveAfterEveryChange,{QS("AutoSaveAfterEveryChange"), Roaming, true}},
{Config::AutoReloadOnChange,{QS("AutoReloadOnChange"), Roaming, true}},
{Config::AutoSaveOnExit,{QS("AutoSaveOnExit"), Roaming, true}},
{Config::AutoSaveNonDataChanges,{QS("AutoSaveNonDataChanges"), Roaming, true}},
{Config::BackupBeforeSave,{QS("BackupBeforeSave"), Roaming, false}},
{Config::UseAtomicSaves,{QS("UseAtomicSaves"), Roaming, true}},
{Config::SearchLimitGroup,{QS("SearchLimitGroup"), Roaming, false}},
@ -73,7 +74,6 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
{Config::AutoTypeStartDelay,{QS("AutoTypeStartDelay"), Roaming, 500}},
{Config::GlobalAutoTypeKey,{QS("GlobalAutoTypeKey"), Roaming, 0}},
{Config::GlobalAutoTypeModifiers,{QS("GlobalAutoTypeModifiers"), Roaming, 0}},
{Config::TrackNonDataChanges,{QS("TrackNonDataChanges"), Roaming, false}},
{Config::FaviconDownloadTimeout,{QS("FaviconDownloadTimeout"), Roaming, 10}},
{Config::UpdateCheckMessageShown,{QS("UpdateCheckMessageShown"), Roaming, false}},
{Config::UseTouchID,{QS("UseTouchID"), Roaming, false}},
@ -297,7 +297,6 @@ static const QHash<QString, Config::ConfigKey> deprecationMap = {
{QS("security/IconDownloadFallbackToGoogle"), Config::Security_IconDownloadFallback},
// 2.6.0
{QS("IgnoreGroupExpansion"), Config::TrackNonDataChanges},
{QS("security/autotypeask"), Config::Security_AutoTypeAsk},
{QS("security/clearclipboard"), Config::Security_ClearClipboard},
{QS("security/clearclipboardtimeout"), Config::Security_ClearClipboardTimeout},