diff --git a/src/app/stacktrace_win_dlg.h b/src/app/stacktrace_win_dlg.h index 178213ad3..6c50b4776 100644 --- a/src/app/stacktrace_win_dlg.h +++ b/src/app/stacktrace_win_dlg.h @@ -32,7 +32,6 @@ #include #include -#include "libtorrent/version.hpp" #include "base/utils/misc.h" #include "ui_stacktrace_win_dlg.h" @@ -62,13 +61,14 @@ public: "


" "

" "qBittorrent version: " VERSION "
" - "Libtorrent version: " LIBTORRENT_VERSION "
" + "Libtorrent version: %1
" "Qt version: " QT_VERSION_STR "
" - "Boost version: %1
" - "OS version: %2" + "Boost version: %2
" + "OS version: %3" "


" - "
%3
" + "
%4
" "



") + .arg(Utils::Misc::libtorrentVersionString()) .arg(Utils::Misc::boostVersionString()) .arg(Utils::Misc::osName()) .arg(trace); diff --git a/src/base/utils/misc.cpp b/src/base/utils/misc.cpp index 36149d09d..3ecdbbe69 100644 --- a/src/base/utils/misc.cpp +++ b/src/base/utils/misc.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #ifdef DISABLE_GUI #include @@ -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; +} diff --git a/src/base/utils/misc.h b/src/base/utils/misc.h index 3c61c5cca..b496b68ea 100644 --- a/src/base/utils/misc.h +++ b/src/base/utils/misc.h @@ -58,6 +58,7 @@ namespace Utils #endif QString osName(); QString boostVersionString(); + QString libtorrentVersionString(); int pythonVersion(); QString pythonExecutable(); diff --git a/src/gui/about_imp.h b/src/gui/about_imp.h index e483911e7..32a176187 100644 --- a/src/gui/about_imp.h +++ b/src/gui/about_imp.h @@ -33,7 +33,6 @@ #include "ui_about.h" #include -#include #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();