When async loading a view, ensure its delegates are also async.
authorMartin Jones <martin.jones@nokia.com>
Fri, 30 Mar 2012 01:08:07 +0000 (11:08 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 30 Mar 2012 05:40:21 +0000 (07:40 +0200)
We were forcing a sync incubation the second time the item was
requested synchronously, breaking nested async creation.  The
incubation should only be forced if previously the item was
requested async.

Change-Id: Id2aff97222d7b1262b502994d3f9c0f009a7a909
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
src/quick/items/qquickvisualdatamodel.cpp

index 88d46c6..cea8396 100644 (file)
@@ -803,7 +803,7 @@ QObject *QQuickVisualDataModelPrivate::object(Compositor::Group group, int index
     }
 
     if (cacheItem->incubationTask) {
-        if (!asynchronous) {
+        if (!asynchronous && cacheItem->incubationTask->incubationMode() == QQmlIncubator::Asynchronous) {
             // previously requested async - now needed immediately
             cacheItem->incubationTask->forceCompletion();
         }