Added build hash and branch to about dialog
This commit is contained in:
5
qcma.pro
5
qcma.pro
@@ -90,6 +90,11 @@ TRANSLATIONS += \
|
|||||||
|
|
||||||
VERSION = \\\"'0.2.5'\\\"
|
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}"
|
DEFINES += "QCMA_VER=$${VERSION}"
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
|
@@ -134,7 +134,11 @@ void MainWidget::showAboutDialog()
|
|||||||
|
|
||||||
about.setText(QString("QCMA ") + QCMA_VER);
|
about.setText(QString("QCMA ") + QCMA_VER);
|
||||||
about.setWindowTitle(tr("About QCMA"));
|
about.setWindowTitle(tr("About QCMA"));
|
||||||
|
#ifndef BUILD_HASH
|
||||||
about.setInformativeText(tr("Copyright (C) 2013 Codestation") + "\n");
|
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.setStandardButtons(QMessageBox::Ok);
|
||||||
about.setIconPixmap(QPixmap(":/main/resources/images/qcma.png"));
|
about.setIconPixmap(QPixmap(":/main/resources/images/qcma.png"));
|
||||||
about.setDefaultButton(QMessageBox::Ok);
|
about.setDefaultButton(QMessageBox::Ok);
|
||||||
|
Reference in New Issue
Block a user