Fix build failures with Qt 6
This commit is contained in:
@@ -33,7 +33,9 @@ VMManagerConfig::VMManagerConfig(const ConfigType type, const QString& section)
|
||||
config_type = type;
|
||||
|
||||
settings = new QSettings(configFile, QSettings::IniFormat, this);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
settings->setIniCodec("UTF-8");
|
||||
#endif
|
||||
settings->setFallbacksEnabled(false);
|
||||
if(type == ConfigType::System && !section.isEmpty()) {
|
||||
settings->beginGroup(section);
|
||||
|
||||
@@ -234,7 +234,9 @@ VMManagerSystem::loadSettings()
|
||||
}
|
||||
// qInfo() << "Loaded "<< config_file.filePath() << "status:" << settings.status();
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
// Clear out the config hash in case the config is reloaded
|
||||
for (const auto &outer_key : config_hash.keys()) {
|
||||
config_hash[outer_key].clear();
|
||||
|
||||
Reference in New Issue
Block a user