Skip to content
Permalink
Browse files

Merge pull request #10788 from silverqx/add-zlib-version-to-gui

Add zlib version to GUI & stackdump
  • Loading branch information...
Chocobo1 committed Jun 13, 2019
2 parents 3a0f0c2 + 4f4f435 commit a65f36592a0edf49bb184c4b415654d4d6ea8611
@@ -72,15 +72,17 @@ class StacktraceDialog : public QDialog
"Qt version: " QT_VERSION_STR "<br/>"
"Boost version: %3<br/>"
"OpenSSL version: %4<br/>"
"OS version: %5<br/><br/>"
"Caught signal: %6"
"zlib version: %5<br/>"
"OS version: %6<br/><br/>"
"Caught signal: %7"
"</font></p>"
"<pre><code>%7</code></pre>"
"<pre><code>%8</code></pre>"
"<br/><hr><br/><br/>")
.arg(QString::number(QT_POINTER_SIZE * 8)
, Utils::Misc::libtorrentVersionString()
, Utils::Misc::boostVersionString()
, Utils::Misc::opensslVersionString()
, Utils::Misc::zlibVersionString()
, Utils::Misc::osName()
, sigName
, trace);
@@ -44,6 +44,7 @@
#include <boost/version.hpp>
#include <openssl/opensslv.h>
#include <libtorrent/version.hpp>
#include <zlib.h>

#include <QCoreApplication>
#include <QRegularExpression>
@@ -463,6 +464,13 @@ QString Utils::Misc::opensslVersionString()
return version.split(' ', QString::SkipEmptyParts)[1];
}

QString Utils::Misc::zlibVersionString()
{
// static initialization for usage in signal handler
static const QString version {ZLIB_VERSION};
return version;
}

#ifdef Q_OS_WIN
QString Utils::Misc::windowsSystemPath()
{
@@ -70,6 +70,7 @@ namespace Utils
QString boostVersionString();
QString libtorrentVersionString();
QString opensslVersionString();
QString zlibVersionString();

QString unitString(SizeUnit unit, bool isSpeed = false);

@@ -99,6 +99,7 @@ class AboutDialog : public QDialog
m_ui->labelLibtVer->setText(Utils::Misc::libtorrentVersionString());
m_ui->labelBoostVer->setText(Utils::Misc::boostVersionString());
m_ui->labelOpensslVer->setText(Utils::Misc::opensslVersionString());
m_ui->labelZlibVer->setText(Utils::Misc::zlibVersionString());

Utils::Gui::resize(this);
show();
@@ -441,6 +441,26 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_12">
<property name="text">
<string notr="true">zlib:</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="4" column="2">
<widget class="QLabel" name="labelZlibVer">
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
@@ -71,6 +71,7 @@ void AppController::buildInfoAction()
{"libtorrent", Utils::Misc::libtorrentVersionString()},
{"boost", Utils::Misc::boostVersionString()},
{"openssl", Utils::Misc::opensslVersionString()},
{"zlib", Utils::Misc::zlibVersionString()},
{"bitness", (QT_POINTER_SIZE * 8)}
};
setResult(versions);
@@ -671,6 +671,10 @@ <h3><a name="howto"></a><a name="SEC4" href="#TOC4">How to Apply These Terms to
<td>OpenSSL:</td>
<td><span id="opensslVersion"></span></td>
</tr>
<tr>
<td>zlib:</td>
<td><span id="zlibVersion"></span></td>
</tr>
</table>
</div>

@@ -691,6 +695,7 @@ <h3><a name="howto"></a><a name="SEC4" href="#TOC4">How to Apply These Terms to
$('libtorrentVersion').textContent = info.libtorrent;
$('boostVersion').textContent = info.boost;
$('opensslVersion').textContent = info.openssl;
$('zlibVersion').textContent = info.zlib;
$('qbittorrentVersion').textContent += " (" + info.bitness + "-bit)";
}
}).send();

0 comments on commit a65f365

Please sign in to comment.
You can’t perform that action at this time.