opt: print _MSC_FULL_VER instead of incorrect VS version

the _MSC_FULL_VER and VS version has no direct and sound connection.
This commit is contained in:
Xiao YiFang 2022-05-26 20:30:50 +08:00
parent 6bc1e0d219
commit 96347bef7f
2 changed files with 2 additions and 18 deletions

View file

@ -23,10 +23,8 @@ About::About( QWidget * parent ): QDialog( parent )
ui.version->setText( version );
#if defined (_MSC_VER)
QString compilerVersion = QString( "Visual C++ %1.%2.%3" )
.arg( GD_CXX_MSVC_MAJOR )
.arg( GD_CXX_MSVC_MINOR )
.arg( GD_CXX_MSVC_BUILD );
QString compilerVersion = QString( "Visual C++ Compiler: %1" )
.arg( _MSC_FULL_VER );
#elif defined (__clang__) && defined (__clang_version__)
QString compilerVersion = QLatin1String( "Clang " ) + QLatin1String( __clang_version__ );
#else

View file

@ -7,20 +7,6 @@
#include "ui_about.h"
#include <QDialog>
// Microsoft Visual C++ version
#if defined (_MSC_VER)
// how many digits does the build number have?
# if _MSC_FULL_VER / 10000 == _MSC_VER
# define GD_CXX_MSVC_BUILD (_MSC_FULL_VER % 10000) // four digits
# elif _MSC_FULL_VER / 100000 == _MSC_VER
# define GD_CXX_MSVC_BUILD (_MSC_FULL_VER % 100000) // five digits
# else
# define GD_CXX_MSVC_BUILD 0
# endif
# define GD_CXX_MSVC_MAJOR (_MSC_VER/100-6)
# define GD_CXX_MSVC_MINOR (_MSC_VER%100)
#endif
class About: public QDialog
{
Q_OBJECT