mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-06 09:17:42 +02:00
Fixing builds for Qt4
This commit is contained in:
+17
-28
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user