Browse Source

Merge pull request #9980 from Chocobo1/opensslVersion

Add OpenSSL version to GUI & stackdump
adaptive-webui-19844
Mike Tzou 6 years ago committed by GitHub
parent
commit
c093561532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      src/app/stacktracedialog.h
  2. 8
      src/base/utils/misc.cpp
  3. 1
      src/base/utils/misc.h
  4. 1
      src/gui/aboutdialog.h
  5. 20
      src/gui/aboutdialog.ui

18
src/app/stacktracedialog.h

@ -69,16 +69,18 @@ public: @@ -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);
}

8
src/base/utils/misc.cpp

@ -44,6 +44,8 @@ @@ -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() @@ -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()
{

1
src/base/utils/misc.h

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

1
src/gui/aboutdialog.h

@ -101,6 +101,7 @@ public: @@ -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();

20
src/gui/aboutdialog.ui

@ -421,6 +421,26 @@ @@ -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>

Loading…
Cancel
Save