Improve function interface

`SettingsStorage` methods require `QString` so make `SettingValue` follow it.
`Path::operator+` can use `QStringView` to accept wider audience.
This commit is contained in:
Chocobo1
2022-03-23 23:56:47 +08:00
parent 11cfe38d1c
commit c6b772da11
33 changed files with 222 additions and 239 deletions

View File

@@ -45,7 +45,7 @@
namespace
{
const int MIGRATION_VERSION = 3;
const char MIGRATION_VERSION_KEY[] = "Meta/MigrationVersion";
const QString MIGRATION_VERSION_KEY = u"Meta/MigrationVersion"_qs;
void exportWebUIHttpsFiles()
{
@@ -400,7 +400,7 @@ bool upgrade(const bool /*ask*/)
void setCurrentMigrationVersion()
{
SettingsStorage::instance()->storeValue(QString::fromLatin1(MIGRATION_VERSION_KEY), MIGRATION_VERSION);
SettingsStorage::instance()->storeValue(MIGRATION_VERSION_KEY, MIGRATION_VERSION);
}
void handleChangedDefaults(const DefaultPreferencesMode mode)