diff --git a/SleepyHeadQT.pro b/SleepyHeadQT.pro index 75fdff06..5cea3768 100644 --- a/SleepyHeadQT.pro +++ b/SleepyHeadQT.pro @@ -22,6 +22,15 @@ CONFIG += rtti TARGET = SleepyHead TEMPLATE = app +# GIT_VERSION = $$system(git describe --tags --long --abbrev=6 --dirty="*") + + +#exists(.git):DEFINES += GIT_BRANCH=\\\"$$system(git rev-parse --symbolic-full-name --abbrev-ref HEAD)\\\" +exists(.git):DEFINES += GIT_BRANCH=\\\"$$system(git rev-parse --abbrev-ref HEAD)\\\" +else:DEFINES += GIT_BRANCH=\\\"NOT BUILT FROM GIT SOURCE\\\" + +exists(.git):DEFINES += GIT_REVISION=\\\"$$system(git rev-parse HEAD)\\\" +else:DEFINES += GIT_BRANCH=\\\"UNKNOWN\\\" SOURCES += main.cpp\ SleepLib/machine.cpp \ diff --git a/mainwindow.cpp b/mainwindow.cpp index 3f2bd9d5..075150a4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -62,7 +62,9 @@ MainWindow::MainWindow(QWidget *parent) : logtime.start(); ui->setupUi(this); - this->setWindowTitle(tr("SleepyHead")+QString(" v%1.%2.%3 BREAKY (%4)").arg(major_version).arg(minor_version).arg(revision_number).arg(PREF["Profile"].toString())); + QString version=PREF["VersionString"].toString(); + if (QString(GIT_BRANCH)!="master") version+=QString(" ")+QString(GIT_BRANCH); + this->setWindowTitle(tr("SleepyHead")+QString(" v%1 (Profile: %2)").arg(version).arg(PREF["Profile"].toString())); ui->tabWidget->setCurrentIndex(0); //move(0,0); overview=NULL; @@ -368,12 +370,13 @@ void MainWindow::on_webView_loadProgress(int progress) void MainWindow::on_action_About_triggered() { - QString msg=tr("