src/version.cpp

changeset 268
fb319526ba6c
parent 264
76a025db4948
child 272
9d52b119b3f5
equal deleted inserted replaced
267:9a482f506747 268:fb319526ba6c
19 #include <QString> 19 #include <QString>
20 #include <time.h> 20 #include <time.h>
21 #include <hginfo.h> 21 #include <hginfo.h>
22 #include "src/version.h" 22 #include "src/version.h"
23 23
24 static QString makeVersionString(const Version &version) 24 const char* fullVersionString()
25 { 25 {
26 QString result = QString::number(version.major) + "." + QString::number(version.minor); 26 if (::BUILD_TYPE != ReleaseBuild) {
27 if (version.patch != 0) { 27 return VERSION_STRING "-" HG_DATE_VERSION;
28 result += ".";
29 result += QString::number(version.patch);
30 } 28 }
31 return result; 29 else {
32 } 30 return VERSION_STRING;
33
34 const QString& fullVersionString()
35 {
36 #ifdef HG_DATE_VERSION
37 if (::BUILD_TYPE != ReleaseBuild) {
38 static const QString result = makeVersionString(APPVERSION) + "-" HG_DATE_VERSION;
39 return result;
40 } 31 }
41 #else
42 static const QString result = makeVersionString(::version);
43 return result;
44 #endif
45 } 32 }
46 33
47 static QString makeCommitTimeString() 34 static QString makeCommitTimeString()
48 { 35 {
49 QString result; 36 QString result;

mercurial