Preparations for 0.30.

This commit is contained in:
Matthias Koefferlein 2025-03-21 23:52:08 +01:00
parent 12b3cd011b
commit 69a8f3ac11
2 changed files with 67 additions and 0 deletions

View File

@ -1,3 +1,10 @@
klayout (0.30.0-1) unstable; urgency=low
* New features and bugfixes
- See changelog
-- Matthias Köfferlein <matthias@koefferlein.de> Tue, 25 Mar 2025 00:00:00 +0100
klayout (0.29.12-1) unstable; urgency=low
* New features and bugfixes

View File

@ -34,6 +34,12 @@
#include <functional>
#include <stdint.h>
// for std::hash of QString and QByteArray
#if defined(HAVE_QT)
# include <QString>
# include <QByteArray>
#endif
#include "tlSList.h"
/**
@ -342,6 +348,60 @@ namespace std
}
};
#if defined(HAVE_QT) && QT_VERSION < 0x050000
/**
* @brief Generic hash for QString
*/
template <>
size_t hfunc (const QString &o, size_t h)
{
return hfunc_iterable (o, h);
}
template <>
size_t hfunc (const QString &o)
{
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
*/
template <>
size_t hfunc (const QByteArray &o, size_t h)
{
return hfunc_iterable (o, h);
}
template <>
size_t hfunc (const QByteArray &o)
{
return hfunc (o, size_t (0));
}
template <>
struct hash <QByteArray>
{
size_t operator() (const QString &o) const
{
return hfunc (o);
}
};
#endif
}
#endif