Index: main.cpp =================================================================== diff -u -r84c5373209a1a488c00917995f5553d442d159a4 -rd78da6d940ae8fa0832bd9f073abd5ae2b9eb312 --- main.cpp (.../main.cpp) (revision 84c5373209a1a488c00917995f5553d442d159a4) +++ main.cpp (.../main.cpp) (revision d78da6d940ae8fa0832bd9f073abd5ae2b9eb312) @@ -193,42 +193,45 @@ } } } + /*! * \brief setApplicationVersion * \details sets up the application version regarding the environment variables * which are set by bamboo and if those are not set value of 0 will be used * and revision(build) version will be set to current date/time. */ void setApplicationVersion() { + bool ver_revis_empty = false; QString ver_major = QString("%1").arg(VER_MAJOR ); QString ver_minor = QString("%1").arg(VER_MINOR ); QString ver_micro = QString("%1").arg(VER_MICRO ); QString ver_revis = QString("%1").arg(VER_REVIS ); QString ver_branch = QString("%1").arg(VER_BRANCH ); - bool isOnMaster = !ver_branch.compare("master"); + if (ver_revis.isEmpty()) { ver_revis = VER_REVIS_DEV; + ver_revis_empty = true; + } + + const char * masterbranch = "master"; + bool isOnMaster = !ver_branch.compare(masterbranch); if (isOnMaster) { - ver_branch = ""; + ver_branch = ver_revis_empty ? masterbranch : ""; ver_major += '.'; ver_minor += '.'; ver_micro += '.'; - ver_revis += '.'; } else { ver_branch = VER_BRANCH ; - ver_branch += '.'; - ver_major = VER_MAJOR_DEV ; - ver_minor = VER_MINOR_DEV ; - ver_micro = VER_MICRO_DEV ; ver_revis = VER_REVIS_DEV ; } + if ( ! ver_branch.isEmpty()) ver_branch += '.'; QCoreApplication::setApplicationVersion( - QString("%1%2.%3.%4.%5") - .arg(ver_branch) - .arg(ver_major) - .arg(ver_minor) - .arg(ver_micro) - .arg(ver_revis)); + QString("%1%2%3%4%5") + .arg(ver_branch) + .arg(ver_major) + .arg(ver_minor) + .arg(ver_micro) + .arg(ver_revis)); } #ifdef UNIT_TEST