Skip to content

Commit

Permalink
opt: print _MSC_FULL_VER instead of incorrect VS version
Browse files Browse the repository at this point in the history
the _MSC_FULL_VER and VS version has no direct and sound connection.
  • Loading branch information
xiaoyifang committed May 26, 2022
1 parent 6bc1e0d commit 96347be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
6 changes: 2 additions & 4 deletions about.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 0 additions & 14 deletions about.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 96347be

Please sign in to comment.