diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside2/PySide2/glue/qtcore.cpp | 8 | ||||
-rw-r--r-- | sources/pyside2/libpyside/pyside.h | 2 |
2 files changed, 5 insertions, 5 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())); } }; diff --git a/sources/pyside2/libpyside/pyside.h b/sources/pyside2/libpyside/pyside.h index 95abaeeb1..c1a298cc8 100644 --- a/sources/pyside2/libpyside/pyside.h +++ b/sources/pyside2/libpyside/pyside.h @@ -62,7 +62,7 @@ PYSIDE_API void init(PyObject *module); * Hash function used to enable hash on objects not supported on native Qt library which has toString function. */ template<class T> -inline uint hash(const T& value) +inline Py_ssize_t hash(const T& value) { return qHash(value.toString()); } |