WiP: write GeneralSettings to YAML

This commit is contained in:
Raphael Coeffic
2021-12-31 10:53:09 +01:00
parent 0e437ca492
commit c5d686a6f0
9 changed files with 261 additions and 72 deletions
+6 -9
View File
@@ -220,13 +220,6 @@ bool CategorizedStorageFormat::loadYaml(RadioData & radioData)
qDebug() << tr("Found %1").arg(filename);
}
// setError(tr("Error: Yaml format ignored - under development"));
// return false; // force failure until fully developed
/*
This code a copy of loadBin with yaml file extensions ONLY
*/
QByteArray radioSettingsBuffer;
if (!loadFile(radioSettingsBuffer, "RADIO/radio.yml")) {
setError(tr("Can't extract RADIO/radio.yml"));
@@ -291,6 +284,10 @@ bool CategorizedStorageFormat::loadYaml(RadioData & radioData)
bool CategorizedStorageFormat::writeYaml(const RadioData & radioData)
{
setError("Error: Yaml format ignored - under development");
return false; // force failure until fully developed
QByteArray radioSettingsBuffer;
if (!writeRadioSettingsToYaml(radioData.generalSettings, radioSettingsBuffer)) {
return false;
}
return writeFile(radioSettingsBuffer, "RADIO/radio.yml");
}