Skip to content
  • Kai Koehne's avatar
    QmlDesigner: Fix crash when opening a .qml file with states · d700b847
    Kai Koehne authored
    This fixes an assert in QGraphicsScene because of
    overlapping deferred calls of _q_processDirtyItems & _q_emitUpdated.
    Both used to be queued in the same event loop:
    
     _q_emitUpdated call queued with "calledEmitUpdated=true"
     _q_processDirtyItems call queued
    -> Event loop runs
     _q_emitUpdated runs, setting "calledEmitUpdated=false"
     _q_processDirtyItems runs, asserting because of !calledEmitUpdated
    
    This fix forces the event loop to run between the queueing of
    _q_emitUpdated & _q_processDirtyItems, effectively separating
    both calls.
    
    Task-number: BAUHAUS-459
    Reviewed-by: Christiaan Janssen
    d700b847