mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-29 16:04:21 +00:00
Create helper function to get libtorrent version
This commit is contained in:
parent
12627bbc10
commit
d0e31adaf7
@ -32,7 +32,6 @@
|
||||
|
||||
#include <QString>
|
||||
#include <QDialog>
|
||||
#include "libtorrent/version.hpp"
|
||||
#include "base/utils/misc.h"
|
||||
#include "ui_stacktrace_win_dlg.h"
|
||||
|
||||
@ -62,13 +61,14 @@ public:
|
||||
"<br/><hr><br/>"
|
||||
"<p align=center><font size=4>"
|
||||
"qBittorrent version: " VERSION "<br/>"
|
||||
"Libtorrent version: " LIBTORRENT_VERSION "<br/>"
|
||||
"Libtorrent version: %1<br/>"
|
||||
"Qt version: " QT_VERSION_STR "<br/>"
|
||||
"Boost version: %1<br/>"
|
||||
"OS version: %2"
|
||||
"Boost version: %2<br/>"
|
||||
"OS version: %3"
|
||||
"</font></p><br/>"
|
||||
"<pre><code>%3</code></pre>"
|
||||
"<pre><code>%4</code></pre>"
|
||||
"<br/><hr><br/><br/>")
|
||||
.arg(Utils::Misc::libtorrentVersionString())
|
||||
.arg(Utils::Misc::boostVersionString())
|
||||
.arg(Utils::Misc::osName())
|
||||
.arg(trace);
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <QThread>
|
||||
#include <QSysInfo>
|
||||
#include <boost/version.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
|
||||
#ifdef DISABLE_GUI
|
||||
#include <QCoreApplication>
|
||||
@ -661,3 +662,10 @@ QString Utils::Misc::boostVersionString()
|
||||
.arg(BOOST_VERSION % 100);
|
||||
return ver;
|
||||
}
|
||||
|
||||
QString Utils::Misc::libtorrentVersionString()
|
||||
{
|
||||
// static initialization for usage in signal handler
|
||||
static const QString ver = LIBTORRENT_VERSION;
|
||||
return ver;
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ namespace Utils
|
||||
#endif
|
||||
QString osName();
|
||||
QString boostVersionString();
|
||||
QString libtorrentVersionString();
|
||||
|
||||
int pythonVersion();
|
||||
QString pythonExecutable();
|
||||
|
@ -33,7 +33,6 @@
|
||||
|
||||
#include "ui_about.h"
|
||||
#include <QFile>
|
||||
#include <libtorrent/version.hpp>
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/unicodestrings.h"
|
||||
|
||||
@ -91,7 +90,7 @@ public:
|
||||
|
||||
// Libraries
|
||||
label_11->setText(QT_VERSION_STR);
|
||||
label_12->setText(LIBTORRENT_VERSION);
|
||||
label_12->setText(Utils::Misc::libtorrentVersionString());
|
||||
label_13->setText(Utils::Misc::boostVersionString());
|
||||
|
||||
show();
|
||||
|
Loading…
x
Reference in New Issue
Block a user