Patch: Crash: blocking JS alert and deleting a window

Koos Vriezen koos.vriezen at xs4all.nl
Tue Oct 29 20:56:43 GMT 2002


On Tue, 29 Oct 2002, David Faure wrote:

> On Tuesday 29 October 2002 00:03, Koos Vriezen wrote:
> > And rejecting means it will not be closed immediately? (so KHTMLView can
> > post a CloseEvent next, should work I think)
>
> I don't see why we need to reject / post later, at all.
> The patch seems to work without that.
> (I think that when the close event terminates, then the exit_loop happens,
> and then the destructions happen, so everything's fine)

Think so too, the only delete I can find in QWidget::close(bool) is when
called with TRUE, but QETWidget::translateCloseEvent calls it with FALSE.
I think the deleteLater() is called here (lucky us).

> > > > Not to mention other hosts for KHTML...
> > >
> > > We should put the code in KParts::MainWindow::closeEvent, indeed.
> >
> > Other kparts could benifit from this, great!
>
> Unfortunately this can't be done, KParts::MainWindow doesn't know about
> all the parts it hosts, only about the current one :}
>
> But there are many things "web browser" hosts must do, for a full browser
> implementation - this is just one more.

Oh well,...and konqueror remains the code example for it...

Koos





More information about the kfm-devel mailing list