Skip to content
  • Vishesh Handa's avatar
    KEditTagsDialog: Avoid using QDialog::exec · 2080bc1d
    Vishesh Handa authored
    QDialog::exec runs an event loop at waits for the dialog to be closed.
    Running another event loop is generally not recommended cause it can
    result in *other* events being process which one might not want.
    
    In this particular case the ResourceLoader, which runs in another
    thread, would emit the finished signal would result in the
    FileMetadataWidget deleting all its previous content, which would
    delete the TagWidget and its children aka the KEditTagsDialog => CRASH
    
    Instead we now set the windowModality and use QDialog::open, which
    returns immediately and then connect to the finished signal.
    
    BUG: 281342
    REVIEW: 108354
    2080bc1d