From 5c60ecddaa4db927cf246933a5ba9802c3c8a2e8 Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Fri, 5 Jan 2024 16:23:11 +0100 Subject: Display commit hash in about dialog --- src/aboutdialog.cpp | 7 +++++-- src/aboutdialog.ui | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/aboutdialog.cpp b/src/aboutdialog.cpp index 0a96e59..97e2e90 100644 --- a/src/aboutdialog.cpp +++ b/src/aboutdialog.cpp @@ -6,8 +6,11 @@ AboutDialog::AboutDialog(QWidget* parent) { ui->setupUi(this); - // TODO: show version or git build in about text - //ui->label->setText(ui->label->text().arg("aaa")); +#ifdef GIT_COMMIT_HASH + ui->label->setText(ui->label->text().arg(tr("(commit %1)").arg(GIT_COMMIT_HASH))); +#else + ui->label->setText(ui->label->text().arg("")); +#endif // I have been saved by https://stackoverflow.com/a/22565649 // It's not more complicated than that… thankfully diff --git a/src/aboutdialog.ui b/src/aboutdialog.ui index dd31ae1..4733bbd 100644 --- a/src/aboutdialog.ui +++ b/src/aboutdialog.ui @@ -41,7 +41,7 @@ - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">ActorViewer</span><span style=" font-weight:600;"> %1</span><br/></p><p>ActorViewer is an application that allow one to browse through Fediverse data exports via the help of a Qt-based user interface. It permits one to filter through different types of posts, search through them and view all embedded content related to an Activity.</p><p>This application is licensed under the GNU General Public License, version 3. Please see the LICENSE file, which lists your rights as a user, available in the source code repository's root directory.</p><p>The source code is available at the following web address: <a href="https://git.twilightsparkle.space/ActorViewer/about/"><span style=" text-decoration: underline; color:#ae82c1;">https://git.twilightsparkle.space/ActorViewer/</span></a></p></body></html> + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">ActorViewer</span><span style=" font-size:8pt;font-weight:600;"> %1</span><br/></p><p>ActorViewer is an application which allows one to browse through Fediverse data exports via the help of a Qt-based user interface. It permits one to filter through different types of posts, search through them and view all embedded content related to an Activity.</p><p>This application is licensed under the GNU General Public License, version 3. Please see the LICENSE file, which lists your rights as a user, available in the source code repository's root directory.</p><p>The source code is available at the following web address: <a href="https://git.twilightsparkle.space/ActorViewer/about/"><span style=" text-decoration: underline; color:#ae82c1;">https://git.twilightsparkle.space/ActorViewer/</span></a></p></body></html> true -- cgit v1.2.3-54-g00ecf