From b2fb01ee9c29c6e23c6697471f63810b3d2fe456 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 14 Oct 2020 22:35:54 +0200 Subject: [PATCH] Use QtConcurrent --- src/device/devicemanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device/devicemanager.cpp b/src/device/devicemanager.cpp index eec1fa425..41fa434c8 100644 --- a/src/device/devicemanager.cpp +++ b/src/device/devicemanager.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -46,7 +47,6 @@ #include "devicemanager.h" #include "core/application.h" -#include "core/concurrentrun.h" #include "core/database.h" #include "core/iconloader.h" #include "core/logging.h" @@ -102,7 +102,7 @@ DeviceManager::DeviceManager(Application *app, QObject *parent) connect(this, SIGNAL(DeviceCreatedFromDB(DeviceInfo*)), SLOT(AddDeviceFromDB(DeviceInfo*))); // This reads from the database and contents on the database mutex, which can be very slow on startup. - ConcurrentRun::Run(&thread_pool_, std::bind(&DeviceManager::LoadAllDevices, this)); + QtConcurrent::run(&thread_pool_, std::bind(&DeviceManager::LoadAllDevices, this)); // This proxy model only shows connected devices connected_devices_model_ = new DeviceStateFilterModel(this);