[Webkit-unassigned] [Bug 54024] [Qt] QWebSettings::iconForURL() returns NULL at first call

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 28 15:16:05 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=54024





--- Comment #8 from Stephen <chaohydra at hotmail.com>  2011-11-28 15:16:05 PST ---
The point is that we need load the icon without creating any QWebView. For example, we would want to display the icon on a bookmark toolbar in a browser application. The iconChanged signal is part of QWebView class and we can't use that. We need some other way to determine when the icon is ready for use. 

(In reply to comment #7)
> 
> It happens because when you ask for the icon, it may not have finished to load the mapping between page urls and icon urls, or it has finished it but it didn't load the icon data yet. When you request the pixmap, then you'll be marked as interested in the data for that icon, and then when you get the signal iconChanged, it means it is ready... so you request it again and you'll get the QPixmap you were looking for.
> 
> You could ask for the pixmap in the call iconForURL with size (0,0) so it won't actually give you any data, but it will trigger the load for it. You should do this on startup.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list