mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +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:
parent
e6222bc65c
commit
bed30cb483
9
scripts/getrevision.sh
Normal file
9
scripts/getrevision.sh
Normal 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;
|
@ -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>© %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));
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user