path: root/src/gui
diff options
authorTor Arne Vestbø <>2017-12-22 10:31:48 +0100
committerTor Arne Vestbø <>2018-01-12 09:41:44 +0000
commit2aa9908e24611fa6d321e694b8415ba7e8d364b0 (patch)
treefdd63226b4f8c8c6b218a50fd927d2c1e88b33ba /src/gui
parent5ba29e1672dafe16be004409661aef3a7ebf499a (diff)
Warn when ending painting on backingstore while there's still an active painter
There's no way for the backingstore to end painting on the device by itself, so we warn the user about what's going on. Failing to end painting on the device will e.g. in the case of QRasterBackingStore result in having to make a copy of the QImage data during flush. Change-Id: I3fbac2d7a8a440fdb23197ac2d57d95bfaf9e125 Reviewed-by: Eskil Abrahamsen Blomfeldt <>
Diffstat (limited to 'src/gui')
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 53349dcef4..afd39a6b71 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -209,6 +209,9 @@ void QBackingStore::beginPaint(const QRegion &region)
void QBackingStore::endPaint()
+ if (paintDevice()->paintingActive())
+ qWarning() << "QBackingStore::endPaint() called with active painter on backingstore paint device";