mirror of https://github.com/saitohirga/WSJT-X.git
Merge branch 'develop' of bitbucket.org:k1jt/wsjtx into develop
This commit is contained in:
commit
9dd7e3f8c3
|
@ -31,12 +31,12 @@
|
||||||
auto const& me = mo.enumerator (mo.indexOfEnumerator (#ENUM)); \
|
auto const& me = mo.enumerator (mo.indexOfEnumerator (#ENUM)); \
|
||||||
if (buffer) \
|
if (buffer) \
|
||||||
{ \
|
{ \
|
||||||
v = static_cast<CLASS::ENUM> (me.keyToValue (buffer, &ok)); \
|
v = static_cast<CLASS::ENUM> (me.keyToValue (buffer, &ok)); \
|
||||||
delete [] buffer; \
|
delete [] buffer; \
|
||||||
} \
|
} \
|
||||||
if (!ok) \
|
if (!ok) \
|
||||||
{ \
|
{ \
|
||||||
v = static_cast<CLASS::ENUM> (me.value (0)); \
|
v = static_cast<CLASS::ENUM> (me.value (0)); \
|
||||||
} \
|
} \
|
||||||
return is; \
|
return is; \
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,12 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK (5, 14, 0)
|
||||||
|
// The Qt devs "fixed" this in 5.14 to specialize to use their own
|
||||||
|
// qHash(), it doesn't fix the problem we were addressing as qHash()
|
||||||
|
// returns a uint so is still a poorly distributed 32-bit value on
|
||||||
|
// 64-bit platforms, but we can't specialize ourselves as Qt already
|
||||||
|
// has - sigh.
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
// std::hash<> specialization for QString based on the dbj2
|
// std::hash<> specialization for QString based on the dbj2
|
||||||
|
@ -97,6 +103,7 @@ namespace std
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Register some useful Qt types with QMetaType
|
// Register some useful Qt types with QMetaType
|
||||||
Q_DECLARE_METATYPE (QHostAddress);
|
Q_DECLARE_METATYPE (QHostAddress);
|
||||||
|
|
Loading…
Reference in New Issue