Improve compiler check in about dialog (#167)
* improve compiler check in about dialog * fix typo
This commit is contained in:
parent
e542613acf
commit
2e96a21f6f
|
@ -56,8 +56,24 @@
|
|||
<translation>Website: <a href="%1">%1</a></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<source>Next Generation Microsoft Visual C++</source>
|
||||
<translation>Microsoft Visual C++ de Próxima Geração</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++ 2022</source>
|
||||
<translation>Microsoft Visual C++ 2022</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++ 2019</source>
|
||||
<translation>Microsoft Visual C++ 2019</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++ 2017</source>
|
||||
<translation>Microsoft Visual C++ 2017</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Legacy Microsoft Visual C++</source>
|
||||
<translation>Microsoft Visual C++ Legado</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
@ -125,9 +125,24 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>版本:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widgets/aboutdialog.cpp" line="41"/>
|
||||
<source>Microsoft Visual C++</source>
|
||||
<translation>Microsoft Visual C++</translation>
|
||||
<source>Next Generation Microsoft Visual C++</source>
|
||||
<translation>下一代 Microsoft Visual C++</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++ 2022</source>
|
||||
<translation>Microsoft Visual C++ 2022</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++ 2019</source>
|
||||
<translation>Microsoft Visual C++ 2019</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++ 2017</source>
|
||||
<translation>Microsoft Visual C++ 2017</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Legacy Microsoft Visual C++</source>
|
||||
<translation>旧版 Microsoft Visual C++</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widgets/aboutdialog.cpp" line="45"/>
|
||||
|
|
|
@ -52,8 +52,24 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<source>Next Generation Microsoft Visual C++</source>
|
||||
<translation>下一代 Microsoft Visual C++</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++ 2022</source>
|
||||
<translation>Microsoft Visual C++ 2022</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++ 2019</source>
|
||||
<translation>Microsoft Visual C++ 2019</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Microsoft Visual C++ 2017</source>
|
||||
<translation>Microsoft Visual C++ 2017</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Legacy Microsoft Visual C++</source>
|
||||
<translation>舊版 Microsoft Visual C++</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
@ -29,16 +29,42 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
|||
ui->setupUi(this);
|
||||
ui->lblTitle->setText(ui->lblTitle->text() + tr("Version: ") + REDPANDA_CPP_VERSION);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined(__clang__) // Clang always pretends to be GCC/MSVC. Check it first.
|
||||
# if defined(_MSC_VER)
|
||||
QString templ = "Clang %1.%2.%3 MSVC ABI";
|
||||
# elif defined(__apple_build_version__)
|
||||
QString templ = "Apple Clang %1.%2.%3";
|
||||
# else
|
||||
QString templ = "Clang %1.%2.%3";
|
||||
# endif
|
||||
ui->lblQt->setText(ui->lblQt->text()
|
||||
.arg(qVersion())
|
||||
.arg(templ
|
||||
.arg(__clang_major__)
|
||||
.arg(__clang_minor__)
|
||||
.arg(__clang_patchlevel__)));
|
||||
#elif defined(__GNUC__)
|
||||
ui->lblQt->setText(ui->lblQt->text()
|
||||
.arg(qVersion())
|
||||
.arg(QString("GCC %1.%2")
|
||||
.arg(QString("GCC %1.%2.%3")
|
||||
.arg(__GNUC__)
|
||||
.arg(__GNUC_MINOR__)));
|
||||
.arg(__GNUC_MINOR__)
|
||||
.arg(__GNUC_PATCHLEVEL__)));
|
||||
#elif defined(_MSC_VER)
|
||||
# if (_MSC_VER >= 1940)
|
||||
QString name = tr("Next Generation Microsoft Visual C++");
|
||||
# elif (_MSC_VER >= 1930)
|
||||
QString name = tr("Microsoft Visual C++ 2022");
|
||||
# elif (_MSC_VER >= 1920)
|
||||
QString name = tr("Microsoft Visual C++ 2019");
|
||||
# elif (_MSC_VER >= 1910)
|
||||
QString name = tr("Microsoft Visual C++ 2017");
|
||||
# else
|
||||
QString name = tr("Legacy Microsoft Visual C++");
|
||||
# endif
|
||||
ui->lblQt->setText(ui->lblQt->text()
|
||||
.arg(qVersion())
|
||||
.arg(tr("Microsoft Visual C++")));
|
||||
.arg(name));
|
||||
#else
|
||||
ui->lblQt->setText(ui->lblQt->text()
|
||||
.arg(qVersion())
|
||||
|
|
Loading…
Reference in New Issue