From d1fe5a85e5fcad27a62a7a3358c40896d7a10823 Mon Sep 17 00:00:00 2001 From: balloonflower Date: Tue, 6 Mar 2018 12:18:56 +0800 Subject: [PATCH] Modifying the way to get the version information --- src/smplayer/main.cpp | 4 ++++ src/smplayer/version.cpp | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/smplayer/main.cpp b/src/smplayer/main.cpp index 6f0ff48..4522390 100644 --- a/src/smplayer/main.cpp +++ b/src/smplayer/main.cpp @@ -27,6 +27,10 @@ int main( int argc, char ** argv ) { MyApplication a("kylin-video", argc, argv ); a.setQuitOnLastWindowClosed(false); + + a.setOrganizationName("kylin"); + a.setApplicationName("kylin-video"); + a.setApplicationVersion("1.1.4"); #if QT_VERSION >= 0x040400 // Enable icons in menus diff --git a/src/smplayer/version.cpp b/src/smplayer/version.cpp index aa72beb..5405fa2 100644 --- a/src/smplayer/version.cpp +++ b/src/smplayer/version.cpp @@ -17,15 +17,19 @@ */ #include "version.h" +#include #define USE_SVN_VERSIONS 0 -#define VERSION "1.1.1" +//#define VERSION "1.1.2" QString Version::printable() { - return QString(VERSION); + //return QString(VERSION); + return QString(qApp->applicationVersion()); } QString Version::stable() { - return QString(VERSION); + //return QString(VERSION); + return QString(qApp->applicationVersion()); } +