* Fix ScatterPlotItem performance regression
* Add hover benchmark to ScatterPlotSpeedTest.py
* Removed a performance regression from GraphicsView
* Removed some tests failing due to the last commit
the previous formulation creates an ndarray and then creates an QImage
over it w/o copying. this relies on the QImage thus created being
non-const.
if the QImage was (unintentionally) created as const, the subsequent
QPainter render on the const QImage would trigger a COW. i.e. the
original underlying ndarray wouldn't be updated.
this is only an issue for PyQt bindings where const QImages can be
created.
* Correct id-based keying of scatter plot pixmap cache
Note: naively using the id function results in non-unique keys.
Alternatively, we could serialize the Qt objects and use these in the key. This would provide protection from the user mutating these later, but at a cost to performance.
* Make id attribute private
* Access class variable instead of instance
Multiple tests are executed by pytest with the same Python process.
The QApplication instance is a global object that will be used by
subsequent tests.
The Qt documentation says that the object will only be deleted while
running in an event loop. In addition, the Qt docs also specifically
say that processEvents() does not process DeferredDelete events.
i.e. calling processEvents() in a loop is not equivalent to calling
QApplication.instance().exec_()
the code being removed was committed in 2012.
the reason for the workaround no longer exists.
the reason this code is under scrutiny is because while porting to
PyQt6, calling ev.type() triggered a bug in PyQt6 6.0
The bug that this workaround was for has been fixed in PyQt6 6.0.1.
However our feature test for the bug was faulty and triggers positive
for PyQt6 6.0.1. In other words, we would be needlessly monkey patching
where it wasn't needed.
in PyQt6 6.0.0, QEvent.Type was automatically pickled / unpickled.
in PyQt6 6.0.1, QEvent.Type is now pickled to be an int, so needs to be
recreated back explicitly (like the other bindings)
this change is backwards compatible with PyQt6 6.0.0
triggered only for PyQt binding, Python 3.8, 3.9
there is a mismatch in API:
- QScreen.logicalDotsPerInchX() -> float
- QSvgGenerator.setResolution(int)