mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -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:
@@ -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