From 052ae7325ace75ee1b99e0a1abbb54b140e24444 Mon Sep 17 00:00:00 2001 From: Peter Eszlari Date: Fri, 6 Dec 2019 06:45:08 +0100 Subject: [PATCH] use APPVERSION define ...and display version in about dialog --- CMakeLists.txt | 2 +- app/dialog/about/about.cpp | 7 ++++--- app/main.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c86f9c02..f6f306d05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) -set(OLIVE_DEFINITIONS -DQT_DEPRECATED_WARNINGS) +set(OLIVE_DEFINITIONS -DAPPVERSION="${PROJECT_VERSION}" -DQT_DEPRECATED_WARNINGS) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") diff --git a/app/dialog/about/about.cpp b/app/dialog/about/about.cpp index 76c6fd941..fa87bb108 100644 --- a/app/dialog/about/about.cpp +++ b/app/dialog/about/about.cpp @@ -41,10 +41,11 @@ AboutDialog::AboutDialog(QWidget *parent) : "" "https://www.olivevideoeditor.org/" "

" - "

%1

" // AppName (version identifier) - "

%2

" // First statement - "

%3

" // Second statement + "

%1 %2

" // AppName (version identifier) + "

%3

" // First statement + "

%4

" // Second statement "").arg(QApplication::applicationName(), + QApplication::applicationVersion(), tr("Olive is a non-linear video editor. This software is free and " "protected by the GNU GPL."), tr("Olive Team is obliged to inform users that Olive source code is " diff --git a/app/main.cpp b/app/main.cpp index 6b2e7579f..f27108b6b 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) { QCoreApplication::setOrganizationDomain("olivevideoeditor.org"); QCoreApplication::setApplicationName("Olive"); - QString app_version = "0.2.0"; + QString app_version = APPVERSION; #ifdef GITHASH // Anything after the hyphen is considered "unimportant" information. Text BEFORE the hyphen is used in version // checking project files and config files