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

List:       kde-commits
Subject:    KDE/kdelibs/kio/bookmarks
From:       Daniel Teske <teske () squorn ! de>
Date:       2007-09-30 14:43:16
Message-ID: 1191163396.726079.26885.nullmailer () svn ! kde ! org
[Download RAW message or body]

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 );
+
     QDomElement textElem = doc.createElement( "title" );
     elem.appendChild( textElem );
     textElem.appendChild( doc.createTextNode( text ) );
[prev in list] [next in list] [prev in thread] [next in thread] 

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