Merge pull request #9980 from Chocobo1/opensslVersion

Add OpenSSL version to GUI & stackdump
This commit is contained in:
Mike Tzou 2018-12-09 15:57:33 +08:00 committed by GitHub
commit c093561532
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 8 deletions

View file

@ -69,16 +69,18 @@ public:
"Libtorrent version: %1<br/>"
"Qt version: " QT_VERSION_STR "<br/>"
"Boost version: %2<br/>"
"OS version: %3<br/><br/>"
"Caught signal: %4"
"OpenSSL version: %3<br/>"
"OS version: %4<br/><br/>"
"Caught signal: %5"
"</font></p>"
"<pre><code>%5</code></pre>"
"<pre><code>%6</code></pre>"
"<br/><hr><br/><br/>")
.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);
}

View file

@ -44,6 +44,8 @@
#include <Carbon/Carbon.h>
#endif
#include <openssl/opensslv.h>
#include <QByteArray>
#include <QDebug>
#include <QFileInfo>
@ -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()
{

View file

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

View file

@ -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();

View file

@ -421,6 +421,26 @@
</property>
</spacer>
</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>
</item>
<item>