Drop Qt 5 support
Qt 6 has been available for almost 4 years. Qt 5 is no longer officially supported by Qt for opensource, it's time to drop Qt 5.
This commit is contained in:
@@ -107,11 +107,7 @@ DeviceManager::DeviceManager(Application *app, QObject *parent)
|
||||
QObject::connect(this, &DeviceManager::DeviceCreatedFromDB, this, &DeviceManager::AddDeviceFromDB);
|
||||
|
||||
// This reads from the database and contents on the database mutex, which can be very slow on startup.
|
||||
#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);
|
||||
|
||||
@@ -243,11 +243,7 @@ void DeviceProperties::UpdateFormats() {
|
||||
// Get the device's supported formats list. This takes a long time and it blocks, so do it in the background.
|
||||
supported_formats_.clear();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
QFuture<bool> future = QtConcurrent::run(&ConnectedDevice::GetSupportedFiletypes, device, &supported_formats_);
|
||||
#else
|
||||
QFuture<bool> future = QtConcurrent::run(std::bind(&ConnectedDevice::GetSupportedFiletypes, device, &supported_formats_));
|
||||
#endif
|
||||
QFutureWatcher<bool> *watcher = new QFutureWatcher<bool>();
|
||||
QObject::connect(watcher, &QFutureWatcher<bool>::finished, this, &DeviceProperties::UpdateFormatsFinished);
|
||||
watcher->setFuture(future);
|
||||
|
||||
@@ -111,11 +111,8 @@ class MacOsDeviceLister : public DeviceLister {
|
||||
static QSet<MTPDevice> sMTPDeviceList;
|
||||
};
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
size_t qHash(const MacOsDeviceLister::MTPDevice &device);
|
||||
#else
|
||||
uint qHash(const MacOsDeviceLister::MTPDevice &device);
|
||||
#endif
|
||||
|
||||
inline bool operator==(const MacOsDeviceLister::MTPDevice &a, const MacOsDeviceLister::MTPDevice &b) {
|
||||
return (a.vendor_id == b.vendor_id) && (a.product_id == b.product_id);
|
||||
}
|
||||
|
||||
@@ -101,11 +101,7 @@ class ScopedIOObject {
|
||||
|
||||
QSet<MacOsDeviceLister::MTPDevice> MacOsDeviceLister::sMTPDeviceList;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
size_t qHash(const MacOsDeviceLister::MTPDevice &d) {
|
||||
#else
|
||||
uint qHash(const MacOsDeviceLister::MTPDevice &d) {
|
||||
#endif
|
||||
return qHash(d.vendor_id) ^ qHash(d.product_id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user