Browse Source

Add OpenSSL version to GUI & stackdump

adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
f13bcbd772
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  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:
"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);
} }

8
src/base/utils/misc.cpp

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

1
src/base/utils/misc.h

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

1
src/gui/aboutdialog.h

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

20
src/gui/aboutdialog.ui

@ -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>

Loading…
Cancel
Save