diff --git a/sources/main.cpp b/sources/main.cpp index 43c90af2b..b575d7cba 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -22,6 +22,9 @@ #include "machine_info.h" #include +#include +#include + /** @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", + "

ATTENTION: This application version is UNSTABLE!

" + + "

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.

" + +// "

For details, please take a look at QElectroTech's " +// "versioning concept.

" + + "

Are you really sure to continue with the risk of breaking your " + "files?!

","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(); } diff --git a/sources/qet.h b/sources/qet.h index 190fc86a2..d3a2b0f5c 100644 --- a/sources/qet.h +++ b/sources/qet.h @@ -28,10 +28,19 @@ class QActionGroup; anywhere else within the QElectroTech application. */ namespace QET { + /// Read the release workflow documentation + /// before making changes here!!! + /// QElectroTech version (as string, used to mark projects and elements XML documents) const QString version = "0.80"; /// QElectroTech displayed version const QString displayedVersion = "0.80-DEV"; + /** + @brief FileFormatStable + - On all non-release branches: false + - On release branches: true + */ + const bool FileFormatStable = false; QString license(); //Describe the current state of a graphic item