libkonq release? I'm missing the favicons interface

David Faure faure at kde.org
Tue Feb 16 22:00:50 UTC 2016


On Monday 15 February 2016 20:09:40 Robby Stephenson wrote:
> On Sat, Feb 6, 2016 at 10:21 AM, David Faure <faure at kde.org> wrote:
> 
> > Unaware of this discussion (no time to read kde-devel), I have done exactly
> > this during January. KIO (starting from 5.19) now has a KIOGui library
> > with a
> > FavIconRequestJob, which removes the dependency on the kded module
> > provided by libkonq (I'll kill it soon, since it wasn't released).
> > KIO::favIconForUrl(), which you mention in your mail, now uses the cache
> > where FavIconRequestJob stores icons. Please port tellico to
> > FavIconRequestJob and report any problems to me (or on the
> > kde-frameworks-devel list, or in bugzilla).
> 
> 
> FavIconRequestJob works great. I do see a behavioral regression in
> KIconLoader::loadIcon(). In KDE4, the favicon icon name started with
> "favicons/" and KIconLoader would use it as an overlay for a larger pixmap.
> The code in KIconLoader::loadIcon() checks that the icon name starts with
> "favicons/". With the current state, the icon name is an absolute path so
> the overlay doesn't work.

Ah that's interesting.

I changed the favicon code so that it returns an absolute path because I can't
rely on the startsWith("favicons/") hacks in KIconLoader anymore, I want the
icon returned by FavIconRequestJob to be loadable using QIcon, whichever
icon engine is being used behind the scenes.

I realized that this also improves the konqueror bookmarks XBEL file because
it now contains full paths instead of kde-specific favicons/foo.png which surely
must have created interoperability problems when trying to open such XBEL
files in other browsers or bookmark apps.

I had forgotten about that overlay-on-top-of-text-html-icon special rendering
in KIconLoader (when the icon is bigger than 22x22). If we want to keep this,
probably the best thing to do would be for FavIconRequestJob to have a new
method that returns a QIcon, with an internal icon engine that does this overlaying
on request when loading a large enough icon.
I'm curious though, what's the use case for a large favicon? In KDE4 the only
time I see this is when using Alt+Tab and with konqueror windows open (and that
looks a bit weird because other apps have a much bigger icon than konq's, but
that's an unrelated issue I guess). I guess your app has another use for large
icons with a favicon, I'm just curious what it is, and whether the text-html icon
as the main icon is the best icon to have. This is an opportunity to rethink this
if we want to ;)

> Thanks again for FavIconRequestJob in 5.19, David.

My pleasure.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list