When creating an icon for a website use its favicon if possible.
Details
- Reviewers
dfaure - Group Reviewers
Plasma - Commits
- R120:d821bffe1948: [Icon Applet] Get favicon for website shortcuts
It fails to get the favicon for kde.org but succeeds with other websites but succeeds with others but also fails with some others.
Verified that it downloads the icon only first time and then uses the one from cache. Unfortunately this stuff is from a time before we had apple touch icon and co. so we only get the 16x16 icon :)
Future improvements would be to extract <title> and other information (there's a jumplist thing for websites) from the linked site but I couldn't figure out how to tell the mimetype of that http site with kio (statjob, even with details 2 just gave me octet stream in its kfileitem).
Diff Detail
- Repository
- R120 Plasma Workspace
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Yeah the favicon for kde.org is bigger than the size limit from the kio code -- ironic, isn't it. I never took the time to find out if it could be reduced, or if the size limit should be increased, and whatever other websites and other webbrowsers do.
As for KIO::stat with http, yeah, badly implemented by most webservers. Better use a KIO::get instead, even if you don't need the actual data (if you kill the job or put it on hold you won't be downloading the full data). (I'm not sure what you call "a jumplist thing for websites" so I might be a bit off here in my advice)