File tree Expand file tree Collapse file tree 2 files changed +67
-0
lines changed Expand file tree Collapse file tree 2 files changed +67
-0
lines changed Original file line number Diff line number Diff line change
1
+ klayout (0.30.0-1) unstable; urgency=low
2
+
3
+ * New features and bugfixes
4
+ - See changelog
5
+
6
+ -- Matthias Köfferlein <
[email protected] > Tue, 25 Mar 2025 00:00:00 +0100
7
+
1
8
klayout (0.29.12-1) unstable; urgency=low
2
9
3
10
* New features and bugfixes
Original file line number Diff line number Diff line change 34
34
#include < functional>
35
35
#include < stdint.h>
36
36
37
+ // for std::hash of QString and QByteArray
38
+ #if defined(HAVE_QT)
39
+ # include < QString>
40
+ # include < QByteArray>
41
+ #endif
42
+
37
43
#include " tlSList.h"
38
44
39
45
/* *
@@ -342,6 +348,60 @@ namespace std
342
348
}
343
349
};
344
350
351
+ #if defined(HAVE_QT) && QT_VERSION < 0x050000
352
+
353
+ /* *
354
+ * @brief Generic hash for QString
355
+ */
356
+
357
+ template <>
358
+ size_t hfunc (const QString &o, size_t h)
359
+ {
360
+ return hfunc_iterable (o, h);
361
+ }
362
+
363
+ template <>
364
+ size_t hfunc (const QString &o)
365
+ {
366
+ return hfunc (o, size_t (0 ));
367
+ }
368
+
369
+ template <>
370
+ struct hash <QString>
371
+ {
372
+ size_t operator () (const QString &o) const
373
+ {
374
+ return hfunc (o);
375
+ }
376
+ };
377
+
378
+ /* *
379
+ * @brief Generic hash for QByteArray
380
+ */
381
+
382
+ template <>
383
+ size_t hfunc (const QByteArray &o, size_t h)
384
+ {
385
+ return hfunc_iterable (o, h);
386
+ }
387
+
388
+ template <>
389
+ size_t hfunc (const QByteArray &o)
390
+ {
391
+ return hfunc (o, size_t (0 ));
392
+ }
393
+
394
+ template <>
395
+ struct hash <QByteArray>
396
+ {
397
+ size_t operator () (const QString &o) const
398
+ {
399
+ return hfunc (o);
400
+ }
401
+ };
402
+
403
+ #endif
404
+
345
405
}
346
406
347
407
#endif
You can’t perform that action at this time.
0 commit comments