chore(cpn): rename storage format Labels to Tree (#7625)

This commit is contained in:
Neil Horne
2026-09-14 12:56:46 +10:00
committed by GitHub
parent aa726095d9
commit 2e6439854e
7 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ set(${PROJECT_NAME}_NAMES
appdata
firmwareinterface
storage
labeled
tree
sdcard
etx
yaml
+2 -2
View File
@@ -45,7 +45,7 @@ bool EtxFormat::load(RadioData & radioData)
return false;
}
bool result = LabelsStorageFormat::load(radioData);
bool result = TreeStorageFormat::load(radioData);
mz_zip_reader_end(&zip_archive);
return result;
}
@@ -60,7 +60,7 @@ bool EtxFormat::write(RadioData & radioData)
return false;
}
bool result = LabelsStorageFormat::write(radioData);
bool result = TreeStorageFormat::write(radioData);
if (result) {
// finalize archive and get contents
+3 -3
View File
@@ -21,17 +21,17 @@
#pragma once
#include "labeled.h"
#include "tree.h"
#include <QtCore>
class EtxFormat : public LabelsStorageFormat
class EtxFormat : public TreeStorageFormat
{
Q_DECLARE_TR_FUNCTIONS(EtxFormat)
public:
EtxFormat(const QString & filename):
LabelsStorageFormat(filename)
TreeStorageFormat(filename)
{
}
+1 -1
View File
@@ -31,7 +31,7 @@ bool SdcardFormat::write(RadioData & radioData)
dir.mkdir("RADIO");
dir.mkdir("MODELS");
dir.mkdir("IMAGES");
return LabelsStorageFormat::write(radioData);
return TreeStorageFormat::write(radioData);
}
bool SdcardFormat::loadFile(QByteArray & filedata, const QString & filename, bool optional)
+3 -3
View File
@@ -21,17 +21,17 @@
#pragma once
#include "labeled.h"
#include "tree.h"
#include <QtCore>
class SdcardFormat : public LabelsStorageFormat
class SdcardFormat : public TreeStorageFormat
{
Q_DECLARE_TR_FUNCTIONS(SdcardFormat)
public:
SdcardFormat(const QString & filename):
LabelsStorageFormat(filename)
TreeStorageFormat(filename)
{
}
@@ -19,14 +19,14 @@
* GNU General Public License for more details.
*/
#include "labeled.h"
#include "tree.h"
#include "firmwares/opentx/opentxinterface.h"
#include "firmwares/edgetx/edgetxinterface.h"
#include "progressdialog.h"
#include <regex>
StorageType LabelsStorageFormat::probeFormat()
StorageType TreeStorageFormat::probeFormat()
{
if (QFile(filename + "/RADIO/radio.yml").exists()) // converted
return getStorageType("radio.yml");
@@ -34,7 +34,7 @@ StorageType LabelsStorageFormat::probeFormat()
return getStorageType(filename);
}
bool LabelsStorageFormat::load(RadioData & radioData)
bool TreeStorageFormat::load(RadioData & radioData)
{
int steps = 2; // initialisation and load radio.yml
bool hasLabels = getCurrentFirmware()->getCapability(HasModelLabels);
@@ -211,7 +211,7 @@ bool LabelsStorageFormat::load(RadioData & radioData)
return true;
}
bool LabelsStorageFormat::write(RadioData & radioData)
bool TreeStorageFormat::write(RadioData & radioData)
{
// TODO
// move all unique radio settings to a separate file eg RADIO/hardware.yml.
@@ -377,7 +377,7 @@ bool LabelsStorageFormat::write(RadioData & radioData)
return true;
}
bool LabelsStorageFormat::loadChecklist(ModelData & model)
bool TreeStorageFormat::loadChecklist(ModelData & model)
{
const QString fname("MODELS/" + model.getChecklistFilename());
//qDebug() << "Searching for checklist file:" << fname;
@@ -388,7 +388,7 @@ bool LabelsStorageFormat::loadChecklist(ModelData & model)
return true;
}
bool LabelsStorageFormat::writeChecklist(const ModelData & model)
bool TreeStorageFormat::writeChecklist(const ModelData & model)
{
if (!model.checklistData.isEmpty()) {
const QString fname("MODELS/" + model.getChecklistFilename());
@@ -401,7 +401,7 @@ bool LabelsStorageFormat::writeChecklist(const ModelData & model)
return true;
}
bool LabelsStorageFormat::loadRadioSettings(GeneralSettings & generalSettings)
bool TreeStorageFormat::loadRadioSettings(GeneralSettings & generalSettings)
{
QByteArray radioSettingsBuffer;
@@ -31,12 +31,12 @@
#include <list>
#include <string>
class LabelsStorageFormat : public StorageFormat
class TreeStorageFormat : public StorageFormat
{
Q_DECLARE_TR_FUNCTIONS(LabelsStorageFormat)
Q_DECLARE_TR_FUNCTIONS(TreeStorageFormat)
public:
LabelsStorageFormat(const QString & filename):
TreeStorageFormat(const QString & filename):
StorageFormat(filename)
{
}