From 73bf1bae926daeec135bb9838782916142a840f0 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 31 Oct 2011 13:10:51 +0000 Subject: [PATCH] Only issue non-threaded renderer warning once MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Id278fa28080d829763c907423089897728b01baa Reviewed-by: Samuel Rødal --- src/declarative/items/qquickcanvas.cpp | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/declarative/items/qquickcanvas.cpp b/src/declarative/items/qquickcanvas.cpp index 163dc88..86d44db 100644 --- a/src/declarative/items/qquickcanvas.cpp +++ b/src/declarative/items/qquickcanvas.cpp @@ -132,9 +132,13 @@ public: : updatePending(false) , animationRunning(false) { - qWarning("QQuickCanvas: using non-threaded render loop. Be very sure to not access scene graph " - "objects outside the QQuickItem::updatePaintNode() call. Failing to do so will cause " - "your code to crash on other platforms!"); + static bool warningMessage = false; + if (!warningMessage) { + warningMessage = true; + qWarning("QQuickCanvas: using non-threaded render loop. Be very sure to not access scene " + "graph objects outside the QQuickItem::updatePaintNode() call. Failing to do so " + "will cause your code to crash on other platforms!"); + } } virtual void paint() { -- 1.7.2.5