diff --git a/src/app/stacktrace_win_dlg.h b/src/app/stacktrace_win_dlg.h index eb4604477..72cf4715a 100644 --- a/src/app/stacktrace_win_dlg.h +++ b/src/app/stacktrace_win_dlg.h @@ -34,6 +34,7 @@ #include #include "boost/version.hpp" #include "libtorrent/version.hpp" +#include "base/utils/misc.h" #include "ui_stacktrace_win_dlg.h" class StraceDlg : public QDialog, private Ui::errorDialog @@ -67,13 +68,15 @@ public: "qBittorrent version: " VERSION "
" "Libtorrent version: " LIBTORRENT_VERSION "
" "Qt version: " QT_VERSION_STR "
" - "Boost version: %1.%2.%3" + "Boost version: %1.%2.%3
" + "OS version: %4" "


" - "
%4
" + "
%5
" "



") .arg(boostVerMajor) .arg(boostVerMinor) .arg(boostVerSubMin) + .arg(Utils::Misc::osName()) .arg(trace); errorText->setHtml(htmlStr); diff --git a/src/base/utils/misc.cpp b/src/base/utils/misc.cpp index 580fa7ad1..2ee30c752 100644 --- a/src/base/utils/misc.cpp +++ b/src/base/utils/misc.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #ifdef DISABLE_GUI #include @@ -634,3 +635,18 @@ QSize Utils::Misc::smallIconSize() return QSize(s, s); } #endif + +QString Utils::Misc::osName() +{ + // static initialization for usage in signal handler + static const QString name = +#ifdef QBT_USES_QT5 + QString("%1 %2 %3") + .arg(QSysInfo::prettyProductName()) + .arg(QSysInfo::kernelVersion()) + .arg(QSysInfo::currentCpuArchitecture()); +#else + ""; +#endif + return name; +} diff --git a/src/base/utils/misc.h b/src/base/utils/misc.h index bfc4d00e4..3a2250e4b 100644 --- a/src/base/utils/misc.h +++ b/src/base/utils/misc.h @@ -56,6 +56,8 @@ namespace Utils QPoint screenCenter(QWidget *win); QSize smallIconSize(); #endif + QString osName(); + int pythonVersion(); QString pythonExecutable(); QString pythonVersionComplete();