cache: save disk cache index on a regular interval in case of crashing

DiskManager tries to keep track of all files made across sessions in an
index, but the index was only saved on close. This meant if the program
crashed (not an uncommon occurrence at the moment), it would "forget" about
any files it had made that session.
This commit is contained in:
itsmattkc
2020-08-16 17:08:04 +10:00
parent b3e30b8daf
commit 0f3a60aa49
3 changed files with 16 additions and 0 deletions
+1
View File
@@ -67,6 +67,7 @@ void Config::SetDefaults()
SetEntryInternal(QStringLiteral("HoverFocus"), NodeParam::kBoolean, false);
SetEntryInternal(QStringLiteral("AudioScrubbing"), NodeParam::kBoolean, true);
SetEntryInternal(QStringLiteral("AutorecoveryInterval"), NodeParam::kInt, 1);
SetEntryInternal(QStringLiteral("DiskCacheSaveInterval"), NodeParam::kInt, 10000);
SetEntryInternal(QStringLiteral("Language"), NodeParam::kString, QLocale::system().name());
SetEntryInternal(QStringLiteral("ScrollZooms"), NodeParam::kBoolean, false);
SetEntryInternal(QStringLiteral("EnableSeekToImport"), NodeParam::kBoolean, false);