[Nepomuk] Review Request: KEditTagsDialog: Avoid using QDialog::exec
Vishesh Handa
me at vhanda.in
Fri Jan 11 19:29:04 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108354/
-----------------------------------------------------------
Review request for Nepomuk.
Description
-------
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
This addresses bug 281342.
http://bugs.kde.org/show_bug.cgi?id=281342
Diffs
-----
ui/filemetadatawidget.cpp 895796b
ui/tagwidget.h ab575f8
ui/tagwidget.cpp 5d1ef1c
ui/tagwidget_p.h 6a41f97
Diff: http://git.reviewboard.kde.org/r/108354/diff/
Testing
-------
Can't seem to crash it.
Thanks,
Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130111/f3ff2cc5/attachment.html>
More information about the Nepomuk
mailing list