On Sunday 11 May 2008, Adam Treat wrote:
> On Sunday 11 May 2008, Darin Adler wrote:
> > Or you could do as Safari does and call iconForPageURL twice; the
> > first time it's "display the icon if we already have it" but the
> > second time it's "I heard you have a new icon, lets display the new
> > icon we now know about".
> >
> > It would probably be cleaner if triggering the load of the icon was
> > completely separate from actually fetching the icon data.
>
> Right.  I would suggest that iconForPageURL should always return 0 unless
> and until readIconForPageURLFromDisk is called which actually triggers the
> load.
>
> It should be noted that *nothing* currently uses
> readIconForPageURLFromDisk() ;)
>
> I guess I just couldn't believe that Safari calls iconForPageURL twice.  It
> is very unclear API.

Simon, 

I don't think QtWebKit API deals with this asynchronous nature of the 
IconDatabase at all.  I'm not sure how to deal with it as it would seem that 
QWebSettings::iconForUrl() needs to be deprecated and possibly all the icon  
database API in QWebSettings.  

Looks like we need at a minimum a public API signal that the icon has been 
loaded (either from disk or network) and that will require a new class as 
QWebSettings is not a QObject.  QWebIconDatabase ?? :(

Cheers,

Adam
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to