1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Showing revision number in About dialog.

- it will be only shown when compiling with git_revision file
  in root directory (where QupZilla.pro is).

  This file should contain commit hash.
This commit is contained in:
nowrep 2011-12-16 14:46:31 +01:00
parent e6222bc65c
commit bed30cb483
3 changed files with 18 additions and 1 deletions

9
scripts/getrevision.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
#git show-ref refs/heads/master | cut -d " " -f 1 | cut -c 1-10
cd ..
if [ -e "git_revision" ]; then
cat git_revision | cut -c 1-10;
fi
exit;

View File

@ -55,7 +55,11 @@ void AboutDialog::showAbout()
ui->authorsButton->setText(tr("Authors and Contributors"));
if (m_aboutHtml.isEmpty()) {
m_aboutHtml.append("<div style='margin:10px;'>");
m_aboutHtml.append(tr("<p><b>Application version %1</b><br/>").arg(QupZilla::VERSION));
m_aboutHtml.append(tr("<p><b>Application version %1</b><br/>").arg(QupZilla::VERSION
#ifdef GIT_REVISION
+ " (" + GIT_REVISION + ")"
#endif
));
m_aboutHtml.append(tr("<b>WebKit version %1</b></p>").arg(QupZilla::WEBKITVERSION));
m_aboutHtml.append(tr("<p>&copy; %1 %2<br/>All rights reserved.<br/>").arg(QupZilla::COPYRIGHT, QupZilla::AUTHOR));
m_aboutHtml.append(tr("<small>Build time: %1 </small></p>").arg(QupZilla::BUILDTIME));

View File

@ -401,6 +401,10 @@ unix {
INSTALLS += target target1 target2 target3
INSTALLS += ico16 ico32 ico48 ico64 ico128 ico256
#Git revision
rev = $$system(sh ../scripts/getrevision.sh)
!equals(rev, ""): DEFINES += GIT_REVISION=\\\"""$$rev"\\\""
}
d_unreleased_build = $$(UNRELEASED_BUILD)