From kde-commits Sun Sep 30 22:19:38 2007 From: David Faure Date: Sun, 30 Sep 2007 22:19:38 +0000 To: kde-commits Subject: Re: KDE/kdelibs/kio/bookmarks Message-Id: <200710010019.46142.faure () kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=119119245022109 On Sunday 30 September 2007, Daniel Teske wrote: > SVN commit 719185 by teske: > > Newly added bookmakrs get the favicon. > > > > M +8 -2 kbookmark.cc > > > --- trunk/KDE/kdelibs/kio/bookmarks/kbookmark.cc #719184:719185 > @@ -148,14 +148,20 @@ > return bm; > } > > -KBookmark KBookmarkGroup::addBookmark( const QString & text, const KUrl & url, const QString & icon ) > +KBookmark KBookmarkGroup::addBookmark( const QString & text, const KUrl & url, const QString & _icon ) > { > + QString icon = _icon; > //kDebug(7043) << "KBookmarkGroup::addBookmark " << text << " into " << m_address; > QDomDocument doc = element.ownerDocument(); > QDomElement elem = doc.createElement( "bookmark" ); > elem.setAttribute( "href", url.url() ); // gives us utf8 > - elem.setAttribute( "icon", icon.isEmpty()? KMimeType::iconNameForUrl( url ) : icon ); > > + if(icon.isEmpty()) > + icon = KMimeType::favIconForUrl( url ); > + if(icon.isEmpty()) > + icon = KMimeType::iconNameForUrl( url ); > + elem.setAttribute( "icon", icon ); This is a strange commit; iconNameForUrl calls favIconForUrl already. I guess something might be broken in KMimeType, but this commit seems like a workaround, the real fix would be in KMimeType. -- David Faure, faure@kde.org, sponsored by Trolltech to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).