From 4b92d85763ffe7b3bf475dada1af457840d3f5c6 Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Mon, 11 Dec 2023 19:04:38 +0100 Subject: [PATCH] App: adopt "standard" version number(major.minor.patch) --- src/app/command_system_information.cpp | 9 +++++++++ src/app/dialog_about.cpp | 5 ++++- version.pri | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/app/command_system_information.cpp b/src/app/command_system_information.cpp index c4776065..5d149644 100644 --- a/src/app/command_system_information.cpp +++ b/src/app/command_system_information.cpp @@ -9,6 +9,7 @@ #include "app_module.h" #include "qstring_conv.h" #include "qtwidgets_utils.h" +#include "version.h" #include "../base/meta_enum.h" #include "../base/filepath.h" #include "../base/io_system.h" @@ -218,6 +219,14 @@ QString CommandSystemInformation::data() QString strSysInfo; QTextStream ostr(&strSysInfo); + // Mayo version + ostr << '\n' + << "Mayo: v" << strVersion + << " commit:" << strVersionCommitId + << " revnum:" << versionRevisionNumber + << " " << QT_POINTER_SIZE * 8 << "bit" + << '\n'; + // OS version ostr << '\n' << "OS: " << QSysInfo::prettyProductName() << " [" << QSysInfo::kernelType() << " version " << QSysInfo::kernelVersion() << "]" << '\n' diff --git a/src/app/dialog_about.cpp b/src/app/dialog_about.cpp index 1c62d02a..86d674bb 100644 --- a/src/app/dialog_about.cpp +++ b/src/app/dialog_about.cpp @@ -22,7 +22,10 @@ DialogAbout::DialogAbout(QWidget* parent) tr("%1 By %2").arg(QApplication::applicationName(), QApplication::organizationName()) ); - m_ui->label_Version->setText(m_ui->label_Version->text().arg(strVersion).arg(QT_POINTER_SIZE * 8)); + const QString strVersionFull = + QString("%1 commit:%2 revnum:%3") + .arg(strVersion).arg(strVersionCommitId).arg(versionRevisionNumber); + m_ui->label_Version->setText(m_ui->label_Version->text().arg(strVersionFull).arg(QT_POINTER_SIZE * 8)); m_ui->label_BuildDateTime->setText(m_ui->label_BuildDateTime->text().arg(__DATE__, __TIME__)); m_ui->label_Qt->setText(m_ui->label_Qt->text().arg(QT_VERSION_STR)); m_ui->label_Occ->setText(m_ui->label_Occ->text().arg(OCC_VERSION_COMPLETE)); diff --git a/version.pri b/version.pri index 4d6d961b..07bcd9d9 100644 --- a/version.pri +++ b/version.pri @@ -11,8 +11,8 @@ defined(HAVE_GIT, var) { MAYO_VERSION_MAJ = 0 MAYO_VERSION_MIN = 8 MAYO_VERSION_PAT = 0 -VERSION = $${MAYO_VERSION_MAJ}.$${MAYO_VERSION_MIN}.$${MAYO_VERSION_PAT}.$${MAYO_VERSION_REVNUM} -MAYO_VERSION = $${VERSION}-$$MAYO_VERSION_COMMIT +VERSION = $${MAYO_VERSION_MAJ}.$${MAYO_VERSION_MIN}.$${MAYO_VERSION_PAT} +MAYO_VERSION = $${VERSION} equals(QT_ARCH, i386) { VERSION_TARGET_ARCH = x86