From 8cec4e15491ae6ffc69db1ab134943cfee212714 Mon Sep 17 00:00:00 2001 From: Xian Nox Date: Wed, 18 Dec 2013 11:03:01 +0100 Subject: [PATCH] Added build hash and branch to about dialog --- qcma.pro | 5 +++++ src/mainwidget.cpp | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/qcma.pro b/qcma.pro index 803cb79..8e74f46 100644 --- a/qcma.pro +++ b/qcma.pro @@ -90,6 +90,11 @@ TRANSLATIONS += \ VERSION = \\\"'0.2.5'\\\" +unix { + DEFINES += "BUILD_HASH=\"\\\"$$system(git rev-parse --short HEAD)\\\"\"" + DEFINES += "BUILD_BRANCH=\"\\\"$$system(git rev-parse --abbrev-ref HEAD)\\\"\"" +} + DEFINES += "QCMA_VER=$${VERSION}" unix { diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index 0813f1f..6424512 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -134,7 +134,11 @@ void MainWidget::showAboutDialog() about.setText(QString("QCMA ") + QCMA_VER); about.setWindowTitle(tr("About QCMA")); +#ifndef BUILD_HASH about.setInformativeText(tr("Copyright (C) 2013 Codestation") + "\n"); +#else + about.setInformativeText(tr("Copyright (C) 2013 Codestation\n\nbuild hash: %1\nbuild branch: %2").arg(BUILD_HASH).arg(BUILD_BRANCH)); +#endif about.setStandardButtons(QMessageBox::Ok); about.setIconPixmap(QPixmap(":/main/resources/images/qcma.png")); about.setDefaultButton(QMessageBox::Ok);