ajout export html
This commit is contained in:
@@ -51,10 +51,10 @@ QList<Step> Path::getStep() const
|
||||
}
|
||||
|
||||
Path::Path(QFile *file){
|
||||
if (!file->open(QIODevice::ReadOnly)) {
|
||||
/*if (!file->open(QIODevice::ReadOnly)) {
|
||||
qWarning() << "Could not open file:" << file->errorString();
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
QByteArray data = file->readAll();
|
||||
file->close();
|
||||
QJsonDocument doc = QJsonDocument::fromJson(data);
|
||||
@@ -75,7 +75,7 @@ Path::Path(QFile *file){
|
||||
QJsonArray stepsArray = json["steps"].toArray();
|
||||
for (const QJsonValue &stepValue : stepsArray) {
|
||||
QJsonObject stepObj = stepValue.toObject();
|
||||
//step.append(Step(stepObj));
|
||||
step.append(Step(stepObj));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user