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
+5 -13
View File
@@ -1107,18 +1107,10 @@ QString ModelPrinter::printTelemetryScreen(unsigned int idx, unsigned int line,
QString ModelPrinter::printChecklist()
{
if (!model.displayChecklist)
return "";
QString str = tr("Error: Unable to open or read file!");
QFile file(Helpers::getChecklistFilePath(&model));
if (file.open(QFile::ReadOnly | QFile::Text)) {
QTextStream in(&file);
if (in.status() == QTextStream::Ok) {
str = in.readAll();
str.replace("\n", "<br />");
str.remove("\r");
}
file.close();
}
if (!model.displayChecklist) return QString();
QString str(model.checklistData);
str.replace("\n", "<br />");
str.remove("\r");
return str;
}