[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kio/bookmarks
From:       David Faure <faure () kde ! org>
Date:       2007-09-30 22:19:38
Message-ID: 200710010019.46142.faure () kde ! org
[Download RAW message or body]

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).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic