diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-04-26 15:05:53 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-04-26 18:24:44 +0200 |
| commit | 8a4a6f3aec1b3f99ee902073fe8b0b3cecb91f3e (patch) | |
| tree | ce51cb5271064e8b4de1fc2e175b053165d4ba1b /sources/pyside6/libpyside/pyside_numpy.h | |
| parent | f2b4abb43eec6427a42bd83ea2e54d7a40212260 (diff) | |
libpyside: Add a debug operator for numpy arrays
Task-number: PYSIDE-1880
Pick-to: 6.3
Change-Id: Ifa0f0cd2a170d75def73264d97c6a4d9cf9d34b3
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/libpyside/pyside_numpy.h')
| -rw-r--r-- | sources/pyside6/libpyside/pyside_numpy.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/pyside_numpy.h b/sources/pyside6/libpyside/pyside_numpy.h index 158865c1d..689d64cfa 100644 --- a/sources/pyside6/libpyside/pyside_numpy.h +++ b/sources/pyside6/libpyside/pyside_numpy.h @@ -48,6 +48,8 @@ #include <QtCore/QPoint> #include <QtCore/QPointF> +QT_FORWARD_DECLARE_CLASS(QDebug) + // This header provides a PyArray_Check() definition that can be used to avoid // having to include the numpy headers. When using numpy headers, make sure // to include this header after them to skip the definition. Also remember @@ -79,6 +81,14 @@ PYSIDE_API QList<QPointF> xyDataToQPointFList(PyObject *pyXIn, PyObject *pyYIn); PYSIDE_API QList<QPoint> xyDataToQPointList(PyObject *pyXIn, PyObject *pyYIn); +struct debugPyArrayObject +{ + explicit debugPyArrayObject(PyObject *object) : m_object(object) {} + + PyObject *m_object; +}; + +PYSIDE_API QDebug operator<<(QDebug debug, const debugPyArrayObject &a); } //namespace PySide::Numpy |
