mirror of
https://github.com/Luca1991/NDSFactory.git
synced 2026-02-04 05:36:15 +01:00
Display revision and build informations in about dialog
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "aboutdialog.h"
|
||||
#include "ui_aboutdialog.h"
|
||||
#include "revision.h"
|
||||
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent) :
|
||||
@@ -7,6 +8,11 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||
ui(new Ui::AboutDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QString currentVersion = ui->aboutSoftwareNameLbl->text();
|
||||
QString currentRevision = QString("Rev: %1").arg(GIT_COMMIT_HASH);
|
||||
ui->aboutSoftwareNameLbl->setText(currentVersion + " " + currentRevision);
|
||||
QString buildInfo = QString("Build Date: %1 Time: %2").arg(__DATE__, __TIME__);
|
||||
ui->aboutSoftwareBuildLbl->setText(buildInfo);
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>150</y>
|
||||
<y>140</y>
|
||||
<width>381</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
@@ -52,13 +52,13 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>180</y>
|
||||
<y>190</y>
|
||||
<width>381</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(C) 2019 - Luca D'Amico</string>
|
||||
<string>(C) 2019-2021 - Luca D'Amico</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
@@ -68,7 +68,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>200</y>
|
||||
<y>210</y>
|
||||
<width>381</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@@ -84,7 +84,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>220</y>
|
||||
<y>230</y>
|
||||
<width>381</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@@ -96,6 +96,22 @@
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="aboutSoftwareBuildLbl">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>170</y>
|
||||
<width>381</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Build Info</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
||||
6
ui/dialogs/about/revision.h
Normal file
6
ui/dialogs/about/revision.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef REVISION_H
|
||||
#define REVISION_H
|
||||
|
||||
#define GIT_COMMIT_HASH "658ca1b"
|
||||
|
||||
#endif
|
||||
6
ui/dialogs/about/revision.h.in
Normal file
6
ui/dialogs/about/revision.h.in
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef REVISION_H
|
||||
#define REVISION_H
|
||||
|
||||
#define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user