[PATCH] thread-safe queued KDialogs

David Faure faure at kde.org
Tue Dec 2 10:31:42 GMT 2008


On Saturday 22 November 2008, Sebastian TrĂ¼g wrote:
> The attached patch makes queued dialogs thread-safe. With it, queued 
> KMessagesBoxes and thus, the default KMessage messasge handler.
> This fixes a crash in KRunner when KMimeType tried to complain about missing 
> mimetypes using KMessage which in turn uses KMessageBox which tries to open a 
> QWidget from a thread which is not the GUI thread which triggers an assert. :)

I don't understand how this can work at all.
You're calling this in
void KDialogQueue::queueDialog( QDialog *dialog )
but that method can obviously only be called from the GUI thread,
since it's not allowed to create widgets and dialogs from other threads.

-- 
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list