Only issue non-threaded renderer warning once
authorAaron Kennedy <aaron.kennedy@nokia.com>
Mon, 31 Oct 2011 13:10:51 +0000 (13:10 +0000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 3 Nov 2011 10:39:25 +0000 (11:39 +0100)
Change-Id: Id278fa28080d829763c907423089897728b01baa
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/declarative/items/qquickcanvas.cpp

index 163dc88..86d44db 100644 (file)
@@ -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() {