AW: AW: bugfix KHTMLPart::started(KIO::Job *job)

Grimm, Cornelius grimm at valudo.de
Tue Sep 2 10:17:20 BST 2003


Hi,

> > Now, if "slotLoaderRequestDone()" get's called _before_ the document
> > exists, checkComplete does the completion stuff. And the document is
> > created in begin(), which is called when the first piece of 
> data arrives.
> > This might happen later than the call of "slotLoaderRequestDone()".
> 
> Do you use a user stylesheet? Otherwise I cannot imagine why 
> slotLoaderRequestDone would be called before the document 
> exists, but it 
> would be interesting to find out why and then fix it. 

I found out why.

In the init() function of KHTMLPart we connect to the requestDone() signal
of the global loader object returned by khtml::Cache::loader().

So the slot slotLoaderRequestDone() of KHTMLPart gets called whenever any
other request is complete, even in completely different KHTMLPart windows
within this application.

The implementation of slotLoaderRequestDone() should only call
checkCompleted() if the khtml::DocLoader belongs to this KHTMLPart, but I
don't know how to check this (because the document which knows about it's
loader might be non-existent when the request failed, or not?).

Cornelius




More information about the kfm-devel mailing list