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

@@ -11,6 +11,8 @@ AboutBox::AboutBox(QWidget *parent) :
xmin = ui->frame->x();
ymax = ui->frame->x() + ui->frame->height();
ymin = ui->frame->y();
ui->systemLabel->setText(QString("Built on %1 (%2-%3)").arg(QSysInfo::prettyProductName(), QSysInfo::kernelVersion(), QSysInfo::buildCpuArchitecture()));
ui->versionLabel->setText(QString("Version: %1").arg(VERSION));
}
AboutBox::~AboutBox()

View File

@@ -1,9 +1,12 @@
#ifndef ABOUTBOX_H
#define ABOUTBOX_H
#define VERSION "2.0.0"
#include <QDialog>
#include <QMouseEvent>
#include <iostream>
#include <QSysInfo>
namespace Ui {
class AboutBox;

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) {