QDialog on stack+exec and dbus quit crash is no more

Kevin Krammer krammer at kde.org
Mon Nov 11 18:36:45 GMT 2013


On Monday, 2013-11-11, 19:17:22, Albert Astals Cid wrote:
> El Diumenge, 10 de novembre de 2013, a les 15:45:42, Jan Kundrát va 

> > I've wasted my fair share of time on this in Trojita where we disconnect
> > from the IMAP server upon seeing a network error. This, naturally, leads
> > to
> > freeing memory of some auxiliary objects, and that was a problem when
> > these
> > objects were stuck in e.g. a GUI prompt for password.
> > 
> > The QPointer<QDialog> indeed looks like a kludge. The right way (tm) is,
> > AFAIK, to use asynchronous state everywhere, i.e. have dialogs connected
> > to
> > slots of the object which triggered them. That's also the only way to do
> > these prompts in QML, by the way. Yup, it's more code, but it's needed,
> > IMHO.
> 
> Not sure you're understanding what i say, we have an explicit check about
> QDialog on stack+exec that says "it will crash if you dbus quit".

I was under the impression that "D-Bus triggered quit" or D-Bus interaction in 
general is just one possible cause of "something else triggers the parent 
deletion".

> What I'm saying is that this doesn't happen anymore and we should remove
> that check. You're saying that nested event loops are bad, and that's
> totally right, but can't see how it's related to what i said.

So we have multiple checks that recommend non-stack modal dialogs and you want 
to get rid of one of them or all duplicates of the most generic one?

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131111/86b9eb8f/attachment.sig>


More information about the kde-core-devel mailing list