diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-12-04 09:03:25 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2017-07-22 15:56:41 +0200 |
commit | fc073bef59b83a10ca17c82fe19771f5edee321d (patch) | |
tree | 67aab4e0d5a4e2d9db3e43bc3fb272b500267b4f /kio/bookmarks | |
parent | d16c4300eb9a917ff477f96e6f81c7887c88b0e0 (diff) | |
download | tdelibs-fc073bef59b83a10ca17c82fe19771f5edee321d.tar.gz tdelibs-fc073bef59b83a10ca17c82fe19771f5edee321d.zip |
Fix a number of build warnings
(cherry picked from commit e0b1bfb0140e1d484f71683e820731abdd0779d5)
Diffstat (limited to 'kio/bookmarks')
-rw-r--r-- | kio/bookmarks/kbookmark.cc | 15 | ||||
-rw-r--r-- | kio/bookmarks/kbookmarkmanager.cc | 6 |
2 files changed, 16 insertions, 5 deletions
diff --git a/kio/bookmarks/kbookmark.cc b/kio/bookmarks/kbookmark.cc index 44b8b496c..74657f16f 100644 --- a/kio/bookmarks/kbookmark.cc +++ b/kio/bookmarks/kbookmark.cc @@ -296,16 +296,21 @@ KURL KBookmark::url() const TQString KBookmark::icon() const { TQString icon = element.attribute("icon"); - if ( icon.isEmpty() ) + if ( icon.isEmpty() ) { // Default icon depends on URL for bookmarks, and is default directory // icon for groups. - if ( isGroup() ) + if ( isGroup() ) { icon = "bookmark_folder"; - else - if ( isSeparator() ) + } + else { + if ( isSeparator() ) { icon = "eraser"; // whatever - else + } + else { icon = KMimeType::iconForURL( url() ); + } + } + } return icon; } diff --git a/kio/bookmarks/kbookmarkmanager.cc b/kio/bookmarks/kbookmarkmanager.cc index 96ce12896..b80120fd4 100644 --- a/kio/bookmarks/kbookmarkmanager.cc +++ b/kio/bookmarks/kbookmarkmanager.cc @@ -255,6 +255,7 @@ void KBookmarkManager::convertToXBEL( TQDomElement & group ) { TQDomElement e = n.toElement(); if ( !e.isNull() ) + { if ( e.tagName() == "TEXT" ) { e.setTagName("title"); @@ -280,6 +281,7 @@ void KBookmarkManager::convertToXBEL( TQDomElement & group ) convertToXBEL( e ); } else + { if ( e.tagName() == "BOOKMARK" ) { e.setTagName("bookmark"); // so much difference :-) @@ -294,7 +296,11 @@ void KBookmarkManager::convertToXBEL( TQDomElement & group ) titleElem.appendChild( e.ownerDocument().createTextNode( text ) ); } else + { kdWarning(7043) << "Unknown tag " << e.tagName() << endl; + } + } + } n = n.nextSibling(); } } |