From 736ebca259c75e49dd478639c02ea20e5c61a3ad Mon Sep 17 00:00:00 2001 From: Clayton Groeneveld Date: Thu, 28 Mar 2019 21:04:37 -0500 Subject: [PATCH] UI: Show correct version in about dialog This fixes an issue where the wrong version would be shown in the about dialog when it is a rc release. --- UI/window-basic-about.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/UI/window-basic-about.cpp b/UI/window-basic-about.cpp index 4985bffd6..725d89431 100644 --- a/UI/window-basic-about.cpp +++ b/UI/window-basic-about.cpp @@ -1,7 +1,6 @@ #include "window-basic-about.hpp" #include "window-basic-main.hpp" #include "qt-wrappers.hpp" -#include #include #include #include @@ -17,17 +16,22 @@ OBSAbout::OBSAbout(QWidget *parent) setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); QString bitness; + QString ver; if(sizeof(void*) == 4) bitness = " (32 bit)"; else if(sizeof(void*) == 8) bitness = " (64 bit)"; - ui->version->setText( - QString::number(LIBOBS_API_MAJOR_VER) + "." + - QString::number(LIBOBS_API_MINOR_VER) + "." + - QString::number(LIBOBS_API_PATCH_VER) + - bitness); +#ifdef HAVE_OBSCONFIG_H + ver += OBS_VERSION; +#else + ver += LIBOBS_API_MAJOR_VER + "." + + LIBOBS_API_MINOR_VER + "." + + LIBOBS_API_PATCH_VER; +#endif + + ui->version->setText(ver + bitness); ui->contribute->setText(QTStr("About.Contribute")); ui->donate->setText("" +