mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 05:38:06 -06:00
Add name to threads
This help identifying threads when debugging. The naming scheme is using 'class/function name + variable name'. Note that the length limitaion is 16 chars on linux. On Windows, the limit is 32767 chars. PR #21403.
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
#include <QSplitter>
|
||||
#include <QShortcut>
|
||||
#include <QStackedWidget>
|
||||
#include <QThread>
|
||||
#include <QUrl>
|
||||
|
||||
#include "base/bittorrent/infohash.h"
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <QMessageBox>
|
||||
#include <QModelIndexList>
|
||||
#include <QShortcut>
|
||||
#include <QThread>
|
||||
#include <QWheelEvent>
|
||||
|
||||
#include "base/bittorrent/torrentcontenthandler.h"
|
||||
|
||||
@@ -109,6 +109,7 @@ TorrentCreatorDialog::TorrentCreatorDialog(QWidget *parent, const Path &defaultP
|
||||
updateInputPath(defaultPath);
|
||||
|
||||
m_threadPool.setMaxThreadCount(1);
|
||||
m_threadPool.setObjectName("TorrentCreatorDialog m_threadPool");
|
||||
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
m_ui->checkOptimizeAlignment->hide();
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
, m_defaultColor {defaultColor}
|
||||
, m_currentColor {currentColor}
|
||||
{
|
||||
setObjectName(u"colorWidget"_s);
|
||||
setObjectName("colorWidget");
|
||||
setFrameShape(QFrame::Box);
|
||||
setFrameShadow(QFrame::Plain);
|
||||
setAlignment(Qt::AlignCenter);
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
: QLabel(parent)
|
||||
, m_defaultPath {defaultPath}
|
||||
{
|
||||
setObjectName(u"iconWidget"_s);
|
||||
setObjectName("iconWidget");
|
||||
setAlignment(Qt::AlignCenter);
|
||||
|
||||
setCurrentPath(currentPath);
|
||||
|
||||
@@ -134,6 +134,7 @@ void Utils::Gui::openPath(const Path &path)
|
||||
::CoUninitialize();
|
||||
}
|
||||
});
|
||||
thread->setObjectName("Utils::Gui::openPath thread");
|
||||
QObject::connect(thread, &QThread::finished, thread, &QObject::deleteLater);
|
||||
thread->start();
|
||||
#else
|
||||
@@ -168,6 +169,7 @@ void Utils::Gui::openFolderSelect(const Path &path)
|
||||
::CoUninitialize();
|
||||
}
|
||||
});
|
||||
thread->setObjectName("Utils::Gui::openFolderSelect thread");
|
||||
QObject::connect(thread, &QThread::finished, thread, &QObject::deleteLater);
|
||||
thread->start();
|
||||
#elif defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||
|
||||
Reference in New Issue
Block a user