Skip to content
Snippets Groups Projects
Commit 2725226a authored by Vishesh Handa's avatar Vishesh Handa
Browse files

KEditTagsDialog: Avoid using QDialog::exec

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.

Backported from nepomuk-widgets 2080bc1d4fe7c249c28930b18f03741c53025b13

BUG: 319336
parent 73fa526c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment