Git commit 270b13a1d588d91c9f9b05194baf36620fcf57c2 by Stefan Br=C3=BCns. Committed on 30/09/2012 at 22:55. Pushed by bruns into branch 'KDE/4.9'. Set toolbar attribute on root, do not create empty bookmarks.xml.tbcache If no toolbar attribute is set on any folder (including root), an empty document is saved for .tbcache. Setting toolbar=3Dyes on root element during first lookup avoids this problem, and has the nice side effect of speeding up any future findToolbar() invocations. M +7 -2 kio/bookmarks/kbookmarkmanager.cc http://commits.kde.org/kdelibs/270b13a1d588d91c9f9b05194baf36620fcf57c2 diff --git a/kio/bookmarks/kbookmarkmanager.cc b/kio/bookmarks/kbookmarkman= ager.cc index d8a9cb7..940cffd 100644 --- a/kio/bookmarks/kbookmarkmanager.cc +++ b/kio/bookmarks/kbookmarkmanager.cc @@ -502,9 +502,14 @@ KBookmarkGroup KBookmarkManager::toolbar() // is already loaded QDomElement elem =3D root().findToolbar(); if (elem.isNull()) - return root(); // Root is the bookmark toolbar if none has been se= t. + { + // Root is the bookmark toolbar if none has been set. + // Make it explicit to speed up invocations of findToolbar() + root().internalElement().setAttribute("toolbar", "yes"); + return root(); + } else - return KBookmarkGroup(root().findToolbar()); + return KBookmarkGroup(elem); } = KBookmark KBookmarkManager::findByAddress( const QString & address )