1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 23:37:59 +00:00

Add OpenSSL version to GUI & stackdump

This commit is contained in:
Chocobo1 2018-12-08 12:19:29 +08:00
parent 6bb4eb825b
commit f13bcbd772
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
5 changed files with 40 additions and 8 deletions

View File

@ -69,16 +69,18 @@ public:
"Libtorrent version: %1<br/>" "Libtorrent version: %1<br/>"
"Qt version: " QT_VERSION_STR "<br/>" "Qt version: " QT_VERSION_STR "<br/>"
"Boost version: %2<br/>" "Boost version: %2<br/>"
"OS version: %3<br/><br/>" "OpenSSL version: %3<br/>"
"Caught signal: %4" "OS version: %4<br/><br/>"
"Caught signal: %5"
"</font></p>" "</font></p>"
"<pre><code>%5</code></pre>" "<pre><code>%6</code></pre>"
"<br/><hr><br/><br/>") "<br/><hr><br/><br/>")
.arg(Utils::Misc::libtorrentVersionString()) .arg(Utils::Misc::libtorrentVersionString()
.arg(Utils::Misc::boostVersionString()) , Utils::Misc::boostVersionString()
.arg(Utils::Misc::osName()) , Utils::Misc::opensslVersionString()
.arg(sigName) , Utils::Misc::osName()
.arg(trace); , sigName
, trace);
errorText->setHtml(htmlStr); errorText->setHtml(htmlStr);
} }

View File

@ -44,6 +44,8 @@
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#endif #endif
#include <openssl/opensslv.h>
#include <QByteArray> #include <QByteArray>
#include <QDebug> #include <QDebug>
#include <QFileInfo> #include <QFileInfo>
@ -577,6 +579,12 @@ QString Utils::Misc::libtorrentVersionString()
return ver; return ver;
} }
QString Utils::Misc::opensslVersionString()
{
const QString version {OPENSSL_VERSION_TEXT};
return version.split(' ', QString::SkipEmptyParts)[1];
}
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
QString Utils::Misc::windowsSystemPath() QString Utils::Misc::windowsSystemPath()
{ {

View File

@ -78,6 +78,7 @@ namespace Utils
QString osName(); QString osName();
QString boostVersionString(); QString boostVersionString();
QString libtorrentVersionString(); QString libtorrentVersionString();
QString opensslVersionString();
QString unitString(SizeUnit unit, bool isSpeed = false); QString unitString(SizeUnit unit, bool isSpeed = false);

View File

@ -101,6 +101,7 @@ public:
labelQtVer->setText(QT_VERSION_STR); labelQtVer->setText(QT_VERSION_STR);
labelLibtVer->setText(Utils::Misc::libtorrentVersionString()); labelLibtVer->setText(Utils::Misc::libtorrentVersionString());
labelBoostVer->setText(Utils::Misc::boostVersionString()); labelBoostVer->setText(Utils::Misc::boostVersionString());
labelOpensslVer->setText(Utils::Misc::opensslVersionString());
Utils::Gui::resize(this); Utils::Gui::resize(this);
show(); show();

View File

@ -421,6 +421,26 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="3" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
<string notr="true">OpenSSL:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="labelOpensslVer">
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>