From f13bcbd772f021d47c454ba26f177d689a5df3a2 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 8 Dec 2018 12:19:29 +0800 Subject: [PATCH] Add OpenSSL version to GUI & stackdump --- src/app/stacktracedialog.h | 18 ++++++++++-------- src/base/utils/misc.cpp | 8 ++++++++ src/base/utils/misc.h | 1 + src/gui/aboutdialog.h | 1 + src/gui/aboutdialog.ui | 20 ++++++++++++++++++++ 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/app/stacktracedialog.h b/src/app/stacktracedialog.h index 18d9486c6..3265df657 100644 --- a/src/app/stacktracedialog.h +++ b/src/app/stacktracedialog.h @@ -69,16 +69,18 @@ public: "Libtorrent version: %1
" "Qt version: " QT_VERSION_STR "
" "Boost version: %2
" - "OS version: %3

" - "Caught signal: %4" + "OpenSSL version: %3
" + "OS version: %4

" + "Caught signal: %5" "

" - "
%5
" + "
%6
" "



") - .arg(Utils::Misc::libtorrentVersionString()) - .arg(Utils::Misc::boostVersionString()) - .arg(Utils::Misc::osName()) - .arg(sigName) - .arg(trace); + .arg(Utils::Misc::libtorrentVersionString() + , Utils::Misc::boostVersionString() + , Utils::Misc::opensslVersionString() + , Utils::Misc::osName() + , sigName + , trace); errorText->setHtml(htmlStr); } diff --git a/src/base/utils/misc.cpp b/src/base/utils/misc.cpp index ec1078edc..83e43cc8f 100644 --- a/src/base/utils/misc.cpp +++ b/src/base/utils/misc.cpp @@ -44,6 +44,8 @@ #include #endif +#include + #include #include #include @@ -577,6 +579,12 @@ QString Utils::Misc::libtorrentVersionString() return ver; } +QString Utils::Misc::opensslVersionString() +{ + const QString version {OPENSSL_VERSION_TEXT}; + return version.split(' ', QString::SkipEmptyParts)[1]; +} + #ifdef Q_OS_WIN QString Utils::Misc::windowsSystemPath() { diff --git a/src/base/utils/misc.h b/src/base/utils/misc.h index 45a2e1e89..390217d25 100644 --- a/src/base/utils/misc.h +++ b/src/base/utils/misc.h @@ -78,6 +78,7 @@ namespace Utils QString osName(); QString boostVersionString(); QString libtorrentVersionString(); + QString opensslVersionString(); QString unitString(SizeUnit unit, bool isSpeed = false); diff --git a/src/gui/aboutdialog.h b/src/gui/aboutdialog.h index 1d41fde68..ebcd1d03a 100644 --- a/src/gui/aboutdialog.h +++ b/src/gui/aboutdialog.h @@ -101,6 +101,7 @@ public: labelQtVer->setText(QT_VERSION_STR); labelLibtVer->setText(Utils::Misc::libtorrentVersionString()); labelBoostVer->setText(Utils::Misc::boostVersionString()); + labelOpensslVer->setText(Utils::Misc::opensslVersionString()); Utils::Gui::resize(this); show(); diff --git a/src/gui/aboutdialog.ui b/src/gui/aboutdialog.ui index a21b35394..2fb89da29 100644 --- a/src/gui/aboutdialog.ui +++ b/src/gui/aboutdialog.ui @@ -421,6 +421,26 @@ + + + + OpenSSL: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + +