update qmake file

This commit is contained in:
Aurélie Delhaie
2021-10-19 22:45:05 +02:00
parent b07b7b69eb
commit 2b95b41257
9 changed files with 66 additions and 22 deletions

View File

@@ -104,6 +104,10 @@ void MainWindow::open_save() {
delete file;
QJsonObject obj = QJsonDocument::fromJson(json.toUtf8()).object();
if (obj[KEY_SAVE_FILE_VERSION] != SAVE_FILE_VERSION) {
panic_dialog("Your save file version does not match the supported version."
" Please update this file and restart the application");
}
week_template = Week::from_json(obj[KEY_TEMPLATE].toObject());
QJsonArray arr = obj[KEY_YEARS].toArray();
foreach (QJsonValue val, arr) {