From a6beaf16a611904170ca43d55c0e7d02287fc80d Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 29 Nov 2012 08:41:21 +0100 Subject: [PATCH] Warn about potential abuse of QQuickPaintedItem::paint(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I9908402b3ada90497070930d43eafd433276201f Reviewed-by: Samuel Rødal Reviewed-by: J-P Nurmi --- src/quick/items/qquickpainteditem.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/quick/items/qquickpainteditem.cpp b/src/quick/items/qquickpainteditem.cpp index ab216da..7f90c35 100644 --- a/src/quick/items/qquickpainteditem.cpp +++ b/src/quick/items/qquickpainteditem.cpp @@ -490,6 +490,9 @@ void QQuickPaintedItem::setRenderTarget(RenderTarget target) As a consequence, paint() is not called from the main GUI thread but from the GL enabled renderer thread. At the moment paint() is called, the GUI thread is blocked and this is therefore thread-safe. + + \warning Extreme caution must be used when creating QObjects, emitting signals, starting + timers and similar inside this function as these will have affinity to the rendering thread. */ /*! -- 1.7.2.5