feat(cpn): model notes and checklist files packaged with model files (#6578)

This commit is contained in:
Neil Horne
2025-10-02 14:47:29 +10:00
committed by GitHub
parent 7e53dd87fd
commit 96400a7aff
17 changed files with 191 additions and 207 deletions
+7 -2
View File
@@ -90,12 +90,17 @@ bool EtxFormat::write(const RadioData & radioData)
return result;
}
bool EtxFormat::loadFile(QByteArray & filedata, const QString & filename)
bool EtxFormat::loadFile(QByteArray & filedata, const QString & filename, bool optional)
{
size_t size;
void * data = mz_zip_reader_extract_file_to_heap(&zip_archive, qPrintable(filename), &size, 0);
if (!data) {
return false;
if (optional) {
//qDebug() << "File not found:" << filename;
return true;
} else {
return false;
}
}
qDebug() << QString("Extracted file %1, size=%2").arg(filename).arg(size);