aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/glue
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-24 11:47:03 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-26 15:55:13 +0000
commitb2092a477ff0635c7185037f89361bc6b1c35a36 (patch)
tree2c369aadc5c75f3880e80ca6a50024b6e5ebf773 /sources/pyside2/PySide2/glue
parent41b49a16d62f5c759e4f8053cefa10b3f0390b31 (diff)
Change the return type of the hash functions to Py_ssize_t
This is the proper type and makes it clear that it it is not related to Qt's hash type (uint in Qt 5, size_t in Qt 6). Task-number: PYSIDE-904 Change-Id: I4ce0f5c845c06e5dcd0ad9744a16a995017987ef Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/glue')
-rw-r--r--sources/pyside2/PySide2/glue/qtcore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp
index f941d5cfc..f818dcffe 100644
--- a/sources/pyside2/PySide2/glue/qtcore.cpp
+++ b/sources/pyside2/PySide2/glue/qtcore.cpp
@@ -647,7 +647,7 @@ if (%PYARG_0 == Py_None)
// @snippet qline-hash
namespace PySide {
- template<> inline uint hash(const QLine &v) {
+ template<> inline Py_ssize_t hash(const QLine &v) {
return qHash(qMakePair(qMakePair(v.x1(), v.y1()), qMakePair(v.x2(), v.y2())));
}
};
@@ -715,7 +715,7 @@ if (!PyDateTimeAPI) PySideDateTime_IMPORT;
// @snippet qpoint
namespace PySide {
- template<> inline uint hash(const QPoint &v) {
+ template<> inline Py_ssize_t hash(const QPoint &v) {
return qHash(qMakePair(v.x(), v.y()));
}
};
@@ -723,7 +723,7 @@ namespace PySide {
// @snippet qrect
namespace PySide {
- template<> inline uint hash(const QRect &v) {
+ template<> inline Py_ssize_t hash(const QRect &v) {
return qHash(qMakePair(qMakePair(v.x(), v.y()), qMakePair(v.width(), v.height())));
}
};
@@ -731,7 +731,7 @@ namespace PySide {
// @snippet qsize
namespace PySide {
- template<> inline uint hash(const QSize &v) {
+ template<> inline Py_ssize_t hash(const QSize &v) {
return qHash(qMakePair(v.width(), v.height()));
}
};