From caa4ead1b950ccd811fb91c76cc9354072d4cf91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 12 Jul 2017 12:06:54 +0200 Subject: Flesh out and clean up QBackingStore documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of the functions had wording that suggested people subclass QBackingStore, probably because the docs came from QWindowSurface in QWS times. Clarify the role of the region, window, and offset arguments to flush(), in the case of flushing child windows. Document that paintDevice() is only valid after calling beginPaint(), and should not be cached. Although our own QRasterWindow, and the rasterwindow example, both allow backingstores for child windows, and it works in practice on a few platforms, we keep the documentation stating that they should only be used for top level windows, until we've verified and formalized support for this across platforms. Change-Id: I7b4d6128a0cd2faeb2af9405ac1bcca46440ead1 Reviewed-by: Gatis Paeglis Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Tor Arne Vestbø --- src/gui/painting/qbackingstore.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gui/painting/qbackingstore.h') diff --git a/src/gui/painting/qbackingstore.h b/src/gui/painting/qbackingstore.h index 2ba6e1c906..ed37e11a5b 100644 --- a/src/gui/painting/qbackingstore.h +++ b/src/gui/painting/qbackingstore.h @@ -66,9 +66,7 @@ public: QPaintDevice *paintDevice(); - // 'window' can be a child window, in which case 'region' is in child window coordinates and - // offset is the (child) window's offset in relation to the window surface. - void flush(const QRegion ®ion, QWindow *window = Q_NULLPTR, const QPoint &offset = QPoint()); + void flush(const QRegion ®ion, QWindow *window = nullptr, const QPoint &offset = QPoint()); void resize(const QSize &size); QSize size() const; -- cgit v1.2.3