Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit e17e3759 authored by Heiko Becker's avatar Heiko Becker 🎸

Fix build with Qt 5.14

std::hash<QString> is already specialized in Qt 5.14 [1], so we need
to avoid redifining it with this version.

[1] 4469e36d7203a55a4e158a50f0e9effc3f2fa3c2 in qtbase.git
parent e0058ba1
......@@ -252,10 +252,12 @@ QDebug operator<<(QDebug qd, const ItemInfo &info);
// we provide hash function for qstring and QPersistentModelIndex
namespace std {
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
template <> struct hash<QString>
{
std::size_t operator()(const QString &k) const { return qHash(k); }
};
#endif
template <> struct hash<QPersistentModelIndex>
{
std::size_t operator()(const QPersistentModelIndex &k) const { return qHash(k); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment