Change return type of qHash with Qt 6 to size_t
This commit is contained in:
@@ -109,7 +109,11 @@ 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);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,11 @@ 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