diff --git a/Gui/AboutWindow.cpp b/Gui/AboutWindow.cpp index 48f855fb0c..7e741c61fc 100644 --- a/Gui/AboutWindow.cpp +++ b/Gui/AboutWindow.cpp @@ -322,33 +322,40 @@ AboutWindow::AboutWindow(QWidget* parent) //#define MAC_OS_X_VERSION_10_11_2 101102 //#define MAC_OS_X_VERSION_10_11_3 101103 //#define MAC_OS_X_VERSION_10_11_4 101104 - osVer += QString::fromUtf8(" %1.%2.%3-%4.%5.%6") + //#define MAC_OS_X_VERSION_10_12 101200 + //#define MAC_OS_X_VERSION_10_12_1 101201 + //#define MAC_OS_X_VERSION_10_12_2 101202 + //#define MAC_OS_X_VERSION_10_12_4 101204 + //#define MAC_OS_X_VERSION_10_13 101300 + //#define MAC_OS_X_VERSION_10_13_1 101301 + //#define MAC_OS_X_VERSION_10_13_2 101302 + //#define MAC_OS_X_VERSION_10_13_4 101304 + //#define MAC_OS_X_VERSION_10_14 101400 + //#define MAC_OS_X_VERSION_10_14_1 101401 + //#define MAC_OS_X_VERSION_10_14_4 101404 + //#define MAC_OS_X_VERSION_10_15 101500 + //#define MAC_OS_VERSION_11_0 110000 + //#define MAC_OS_VERSION_11_1 110100 + //#define MAC_OS_VERSION_11_3 110300 + const bool version_available = true; #if MAC_OS_X_VERSION_MIN_REQUIRED < 100000 - .arg(MAC_OS_X_VERSION_MIN_REQUIRED / 100) - .arg( (MAC_OS_X_VERSION_MIN_REQUIRED % 100) / 10) - .arg(MAC_OS_X_VERSION_MIN_REQUIRED % 10) + const unsigned major = MAC_OS_X_VERSION_MIN_REQUIRED / 100; + const unsigned minor = (MAC_OS_X_VERSION_MIN_REQUIRED % 100) / 10; + const unsigned patch = MAC_OS_X_VERSION_MIN_REQUIRED % 10; #else - .arg(MAC_OS_X_VERSION_MIN_REQUIRED / 10000) - .arg((MAC_OS_X_VERSION_MIN_REQUIRED % 10000) / 100) - .arg(MAC_OS_X_VERSION_MIN_REQUIRED % 100) + const unsigned major = MAC_OS_X_VERSION_MIN_REQUIRED / 10000; + const unsigned minor = (MAC_OS_X_VERSION_MIN_REQUIRED % 10000) / 100; + const unsigned patch = MAC_OS_X_VERSION_MIN_REQUIRED % 100; #endif -#if MAC_OS_X_VERSION_MAX_ALLOWED < 100000 - .arg(MAC_OS_X_VERSION_MAX_ALLOWED / 100) - .arg( (MAC_OS_X_VERSION_MAX_ALLOWED % 100) / 10) - .arg(MAC_OS_X_VERSION_MAX_ALLOWED % 10) -#else - .arg(MAC_OS_X_VERSION_MAX_ALLOWED / 10000) - .arg((MAC_OS_X_VERSION_MAX_ALLOWED % 10000) / 100) - .arg(MAC_OS_X_VERSION_MAX_ALLOWED % 100) -#endif - ; #else //#define BOOST_VERSION_NUMBER(major,minor,patch) ( (((major)%100)*10000000) + (((minor)%100)*100000) + ((patch)%100000) ) + const bool version_available = BOOST_OS != BOOST_VERSION_NUMBER_NOT_AVAILABLE; const unsigned major = BOOST_OS/10000000; const unsigned minor = (BOOST_OS-10000000*major)/100000; const unsigned patch = BOOST_OS % 100000; +#endif // coverity[unsigned_compare] - if (BOOST_OS != BOOST_VERSION_NUMBER_NOT_AVAILABLE && major > 0) { + if (version_available && major > 0) { osVer += QString::fromUtf8(" %1").arg(major); // coverity[unsigned_compare] if (minor > 0 || patch > 0) { @@ -358,7 +365,6 @@ AboutWindow::AboutWindow(QWidget* parent) } } } -#endif QString gitStr = QString::fromUtf8("

%1

").arg(tr("This software was compiled from the source " "code branch %1 at version %2 using %3 targeting %4 for %5.") .arg( QString::fromUtf8("" GIT_BRANCH "") ) // %1