mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-20 18:56:07 -05:00
Display git revision in about dialog.
This commit is contained in:
parent
65e8732eeb
commit
3efc8f457a
8 changed files with 235 additions and 0 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#include "ui_AboutDialog.h"
|
||||
|
||||
#include "config-keepassx.h"
|
||||
#include "version.h"
|
||||
#include "core/FilePath.h"
|
||||
|
||||
AboutDialog::AboutDialog(QWidget* parent)
|
||||
|
|
@ -35,6 +36,19 @@ AboutDialog::AboutDialog(QWidget* parent)
|
|||
|
||||
m_ui->iconLabel->setPixmap(filePath()->applicationIcon().pixmap(48));
|
||||
|
||||
QString commitHash;
|
||||
if (!QString(GIT_HEAD).isEmpty()) {
|
||||
commitHash = GIT_HEAD;
|
||||
}
|
||||
else if (!QString(DIST_HASH).contains("Format")) {
|
||||
commitHash = DIST_HASH;
|
||||
}
|
||||
|
||||
if (!commitHash.isEmpty()) {
|
||||
QString labelGit = commitHash;
|
||||
m_ui->label_git->setText(tr("Revision").append(": ").append(labelGit));
|
||||
}
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(close()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue