Fixing builds for Qt4

This commit is contained in:
Matthias Koefferlein 2025-03-22 17:29:16 +01:00
parent ee60ae8146
commit e6914c78b9
1 changed files with 17 additions and 28 deletions

View File

@ -348,21 +348,28 @@ namespace std
}
};
#if defined(HAVE_QT) && QT_VERSION < 0x050000
#if defined(HAVE_QT)
/**
* @brief Generic hash for QChar
*/
template <>
inline size_t hfunc (const QChar &o, size_t h)
{
return hcombine (h, size_t (o.unicode ()));
}
template <>
inline size_t hfunc (const QChar &o)
{
return size_t (o.unicode ());
}
/**
* @brief Generic hash for QString
*/
template <>
struct hash <QChar>
{
size_t operator() (const QChar &o) const
{
return hfunc (o.unicode ());
}
};
template <>
inline size_t hfunc (const QString &o, size_t h)
{
@ -375,15 +382,6 @@ namespace std
return hfunc (o, size_t (0));
}
template <>
struct hash <QString>
{
size_t operator() (const QString &o) const
{
return hfunc (o);
}
};
/**
* @brief Generic hash for QByteArray
*/
@ -400,15 +398,6 @@ namespace std
return hfunc (o, size_t (0));
}
template <>
struct hash <QByteArray>
{
size_t operator() (const QString &o) const
{
return hfunc (o);
}
};
#endif
}