GUI: auto-fix process priority if settings written v60 ≤ version < 60.0.0.18

This commit is contained in:
Moritz Bunkus 2021-08-06 22:15:33 +02:00
parent f6b0f4420e
commit ee8ac18402
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 13 additions and 1 deletions

View File

@ -12,7 +12,10 @@
priority setting for new installations in order to leave more room for other
applications, especially interactive ones. Up to and including v59 the
default was the "normal" process priority. v60 changed that to "lowest",
which turned out to be much slower on Windows for no real gain over "lower".
which turned out to be much slower on Windows for no real gain over
"lower". The setting will be auto-corrected by the GUI if the settings file
were saved last with a version between v60.0.0.0 & v60.0.0.17 & "lowest" &
it is still set to "lowest".
## Bug fixes

View File

@ -313,6 +313,15 @@ Settings::convertOldSettings() {
reg->endGroup();
reg->endGroup();
}
// v60 changed default process priority to "lowest", which isn't a
// good idea; 60.0.0.18 amended it to "low".
if ((writtenByVersion >= version_number_t{"60.0.0.0"}) && (writtenByVersion < version_number_t{"60.0.0.18"})) {
reg->beginGroup(s_grpSettings);
if (reg->value(s_valPriority).toInt() == static_cast<int>(LowestPriority))
reg->setValue(s_valPriority, static_cast<int>(LowPriority));
reg->endGroup();
}
}
void