aboutsummaryrefslogtreecommitdiffstats
path: root/features
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-05-23 16:21:33 +0200
committerSlava Monich <slava.monich@jolla.com>2018-05-24 16:36:25 +0000
commit0e07410b829e7f879f436ca8a168d05016acf84a (patch)
treeab15654f378b462b988cf372043105ec7fc304ae /features
parentdd43adfa2d0d6f4034220cbf917c63709021e392 (diff)
Fix crash when modifying list model in worker thread
If we call get() on a model in a worker thread, we may end up creating a ModelNodeMetaObject (aka cacheObject). Subsequent mutation of properties may make us end up in emitDirectNotifies(). However since we can't have bindings in there, we should shortcut/suppress the notify emission, which we can do by checking ddata->context via qmlEngine(). The previous code crashed when qmlEngine() return a null pointer but QQmlEnginePrivate::get(const QQmlEngine *) would attempt to dereference the parameter. Started-by: Slava Monich<slava.monich@jolla.com> Change-Id: I880619c686436c053692faafa5dba2c96c2ace96 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Slava Monich <slava.monich@jolla.com>
Diffstat (limited to 'features')
0 files changed, 0 insertions, 0 deletions