From de4aeade5ed86b008e6d497563cfcce9583b0c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 3 Apr 2017 16:04:05 +0200 Subject: Delete QRasterWindow backingstore while window is still alive The platform backingstore might need access to the window that the backingstore was created for, e.g. for makingCurrent to release OpenGL resources. In that case leaving it to the QRasterWindowPrivate destructor would be too late, as the QWindow was gone. This was seen on iOS, where the backingstore inherits QRasterBackingStore, and uses composeAndFlush to composit via GL. The raster backingstore cleans up these GL resources in its destructor, so the QIOSBackingStore destructor makes sure that the GL context is current for the window, resulting in a crash since the window is long gone by then. Change-Id: I5a22597842819f0fe3b580856b9e75e4fab32ae5 Reviewed-by: Friedemann Kleint --- src/gui/kernel/qrasterwindow.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qrasterwindow.h') diff --git a/src/gui/kernel/qrasterwindow.h b/src/gui/kernel/qrasterwindow.h index 76312bcda2..9b29183ad6 100644 --- a/src/gui/kernel/qrasterwindow.h +++ b/src/gui/kernel/qrasterwindow.h @@ -54,6 +54,7 @@ class Q_GUI_EXPORT QRasterWindow : public QPaintDeviceWindow public: explicit QRasterWindow(QWindow *parent = Q_NULLPTR); + ~QRasterWindow(); protected: int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE; -- cgit v1.2.3