From 5e0b1a9f1da8aa9db55168b4496cf4fab204cea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Wed, 21 Aug 2019 21:28:05 +0200 Subject: [PATCH] Use the build number in code --- YACReaderLibraryServer/main.cpp | 9 ++++++++- custom_widgets/help_about_dialog.cpp | 10 ++++++++-- files/about.html | 2 +- files/about_es_ES.html | 2 +- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/YACReaderLibraryServer/main.cpp b/YACReaderLibraryServer/main.cpp index 96f88ebf..3c3f1d60 100644 --- a/YACReaderLibraryServer/main.cpp +++ b/YACReaderLibraryServer/main.cpp @@ -83,7 +83,14 @@ int main(int argc, char **argv) app.setApplicationName("YACReaderLibrary"); app.setOrganizationName("YACReader"); - app.setApplicationVersion(VERSION); + + QString buildNumber = ".0"; + +#ifdef BUILD_NUMBER + buildNumber = "." + BUILD_NUMBER; +#endif + + app.setApplicationVersion(VERSION + buildNumber); QTextStream qout(stdout); diff --git a/custom_widgets/help_about_dialog.cpp b/custom_widgets/help_about_dialog.cpp index 7bb4909a..3f9e59cb 100644 --- a/custom_widgets/help_about_dialog.cpp +++ b/custom_widgets/help_about_dialog.cpp @@ -50,7 +50,13 @@ HelpAboutDialog::HelpAboutDialog(const QString &pathAbout, const QString &pathHe void HelpAboutDialog::loadAboutInformation(const QString &path) { - aboutText->setHtml(fileToString(path).arg(VERSION)); + QString buildNumber = "0"; + +#ifdef BUILD_NUMBER + buildNumber = BUILD_NUMBER; +#endif + + aboutText->setHtml(fileToString(path).arg(VERSION).arg(buildNumber)); aboutText->moveCursor(QTextCursor::Start); } @@ -72,4 +78,4 @@ QString HelpAboutDialog::fileToString(const QString &path) f.close(); return content; -} \ No newline at end of file +} diff --git a/files/about.html b/files/about.html index c1269a6c..2144bf40 100644 --- a/files/about.html +++ b/files/about.html @@ -24,7 +24,7 @@

General Information

-YACReader - Yet Another Comic Reader - version %1
+YACReader - Yet Another Comic Reader - version %1.%2
by Luis Ángel San Martín Rodríguez

Contact