aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-04-23 11:12:08 +0200
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-04-25 20:56:34 +0000
commit8018c4b6e7743c576a3548f6e73e588f19f632a9 (patch)
treee14a5c736aa51ffc07a187df97b21b235af458f8 /tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp
parent92433623b31388e2e8c4d532033dad6189eaab24 (diff)
Instantiator: Make asynchronous mode work
This patch proceeds in two steps. First, and the most trivial, we make sure not to offend the Instantiator's objects container since asynchronous creation also means the objects can be created in any order. We do so by ensuring the objects container has always the necessary size. The second step is to make sure the objects don't get destroyed by the delegate model when their incubation tasks are asynchronous. We force to keep an extra reference calling the object() function on the instance model, but only if the creation was asynchronous. However, it's not enough to check for the Instantiatior async value since the incubation tasks in QQmlDelegateModel are async-if-nested. Therefore, we need to keep track of the object index requested to the model and see if it matches when the createdItem() signal gets emitted. Task-number: QTBUG-36410 Change-Id: I180b03b6a7468d6521827a9631755577e9e6d357 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp')
0 files changed, 0 insertions, 0 deletions