Add user warning on startup

notify the user of the use of dev software

ToDo: the text still needs to be adjusted
This commit is contained in:
Simon De Backer
2020-09-05 00:27:24 +02:00
parent 610a44c7cd
commit 87c957a062
2 changed files with 38 additions and 0 deletions

View File

@@ -22,6 +22,9 @@
#include "machine_info.h"
#include <QStyleFactory>
#include <QtCore>
#include <QtWidgets>
/**
@brief myMessageOutput
for debugging
@@ -204,6 +207,32 @@ int main(int argc, char **argv)
delete my_ma;
}
if(! QET::FileFormatStable){
QMessageBox::StandardButton btn = QMessageBox::critical(
nullptr,
QCoreApplication::translate(
"main",
"Unstable file format!"),
QCoreApplication::translate(
"main",
"<p><b>ATTENTION: This application version is UNSTABLE!</b></p>"
"<p>Everything you do with this application can break your "
"workspace, libraries or projects! Saved files will not be "
"readable with stable releases of QElectroTech. It's highly "
"recommended to create a backup before proceeding. If you are "
"unsure, please download an official stable release instead.</p>"
// "<p>For details, please take a look at QElectroTech's "
// "<a href=\"%1\">versioning concept</a>.</p>"
"<p>Are you really sure to continue with the risk of breaking your "
"files?!</p>","this text is not finished yet, expect changes!")
.arg("doc_release_workflow"),
QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
if (!(btn == QMessageBox::Yes))
return 1;
}
return app.exec();
}