Remove use of std::bind where possible

This commit is contained in:
Jonas Kvinge
2020-11-14 02:13:22 +01:00
parent a155e503f4
commit deddaed04a
8 changed files with 45 additions and 10 deletions

View File

@@ -102,7 +102,11 @@ 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.
(void)QtConcurrent::run(&thread_pool_, std::bind(&DeviceManager::LoadAllDevices, this));
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
(void)QtConcurrent::run(&thread_pool_, &DeviceManager::LoadAllDevices, this);
#else
(void)QtConcurrent::run(&thread_pool_, this, &DeviceManager::LoadAllDevices);
#endif
// This proxy model only shows connected devices
connected_devices_model_ = new DeviceStateFilterModel(this);