Skip to content
  • Thomas Hartmann's avatar
    QmlDesigner.ItemLibrary: Start drag using QTimer::singleShot() · 1178a048
    Thomas Hartmann authored
    
    
    A drag might change the imports which invalidates the model exposed
    to qml. Since QObjects are deleted when the model is reseted this did lead to
    a crash in the qml engine, because the object emitting the signal was deleted.
    To avoid this we call startDragAndDrop() asynchronously using QTimer::singleShot().
    Now the object is always deleted after the signal is emitted not during the emit.
    
    Task-number: QTCREATORBUG-11139
    
    Change-Id: I92e7f9dfff33697b9ff0da148dc9da629723ab7e
    Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
    1178a048