Set object names

This commit is contained in:
Jonas Kvinge
2024-09-02 22:26:36 +02:00
parent f265c055a5
commit 2a9ccd7480
20 changed files with 54 additions and 4 deletions

View File

@@ -47,6 +47,8 @@ DeviceDatabaseBackend::DeviceDatabaseBackend(QObject *parent)
db_(nullptr),
original_thread_(nullptr) {
setObjectName(QLatin1String(metaObject()->className()));
original_thread_ = thread();
}

View File

@@ -43,6 +43,8 @@ DeviceLister::DeviceLister(QObject *parent)
original_thread_(nullptr),
next_mount_request_id_(0) {
setObjectName(QLatin1String(metaObject()->className()));
original_thread_ = thread();
}
@@ -60,6 +62,7 @@ DeviceLister::~DeviceLister() {
void DeviceLister::Start() {
thread_ = new QThread;
thread_->setObjectName(objectName());
QObject::connect(thread_, &QThread::started, this, &DeviceLister::ThreadStarted);
moveToThread(thread_);

View File

@@ -94,6 +94,8 @@ DeviceManager::DeviceManager(Application *app, QObject *parent)
app_(app),
not_connected_overlay_(IconLoader::Load(QStringLiteral("edit-delete"))) {
setObjectName(QLatin1String(metaObject()->className()));
thread_pool_.setMaxThreadCount(1);
QObject::connect(&*app_->task_manager(), &TaskManager::TasksChanged, this, &DeviceManager::TasksChanged);