mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 11:37:56 -04:00
Display the kiwix version in the about dialog.
This commit is contained in:
parent
5824083382
commit
48aa87fb48
@ -17,6 +17,17 @@ TEMPLATE = app
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
QMAKE_LFLAGS += -std=c++11
|
||||
|
||||
unix {
|
||||
DEFINES += GIT_VERSION='"$(shell cd $$PWD && git describe --dirty=* --tags --always)"'
|
||||
DEFINES += BUILD_DATE='"$(shell date)"'
|
||||
}
|
||||
|
||||
win32 {
|
||||
DEFINES += GIT_VERSION='"$$system(cd $$PWD && git describe --dirty=* --tags --always)"'
|
||||
DEFINES += BUILD_DATE='"$$system(echo %DATE%)"'
|
||||
}
|
||||
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
|
@ -9,6 +9,8 @@
|
||||
<p>
|
||||
This software is released under the terms of the GNU General Public License version 3. View the source code on <a href="https://github.com/kiwix/kiwix-desktop">Github</a>.
|
||||
</p>
|
||||
<p>Version : %%VERSION%%</p>
|
||||
<p>Build date : %%BUILD_DATE%%</p>
|
||||
<h2>Libraries</h2>
|
||||
<ul>
|
||||
<li>Libzim - GPLv3 (<a href="http://www.openzim.org">openzim.org</a>)</li>
|
||||
|
@ -1,11 +1,18 @@
|
||||
#include "about.h"
|
||||
#include "ui_about.h"
|
||||
|
||||
#define _STR(X) #X
|
||||
#define STR(X) _STR(X)
|
||||
|
||||
About::About(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::AboutDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
auto htmlText = ui->aboutText->toHtml();
|
||||
htmlText = htmlText.replace("%%VERSION%%", STR(GIT_VERSION));
|
||||
htmlText = htmlText.replace("%%BUILD_DATE%%", STR(BUILD_DATE));
|
||||
ui->aboutText->setHtml(htmlText);
|
||||
}
|
||||
|
||||
About::~About()
|
||||
|
Loading…
x
Reference in New Issue
Block a user