summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2012-08-10 11:48:09 +0200
committerYoann Laissus <yoann.laissus@gmail.com>2012-08-10 11:48:09 +0200
commit2c48cd70e58937083c95af6844a111e7c2087eb7 (patch)
treeb1edd90102832eaf1bad41e9c18c0b0ec72361fe /src
parentSVN_SILENT made messages (.desktop file) (diff)
downloadrekonq-2c48cd70e58937083c95af6844a111e7c2087eb7.tar.xz
BookmarkWidget: Clean up setupFolderComboBox()
Diffstat (limited to 'src')
-rw-r--r--src/urlbar/bookmarkwidget.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/urlbar/bookmarkwidget.cpp b/src/urlbar/bookmarkwidget.cpp
index b3658dd9..ba5ade00 100644
--- a/src/urlbar/bookmarkwidget.cpp
+++ b/src/urlbar/bookmarkwidget.cpp
@@ -237,28 +237,29 @@ void BookmarkWidget::accept()
void BookmarkWidget::setupFolderComboBox()
{
- KBookmarkGroup root = rApp->bookmarkManager()->manager()->toolbar();
+ KBookmarkGroup toolBarRoot = rApp->bookmarkManager()->manager()->toolbar();
+ KBookmarkGroup root = rApp->bookmarkManager()->rootGroup();
- if (rApp->bookmarkManager()->manager()->toolbar().address() == rApp->bookmarkManager()->manager()->root().address())
+ if (toolBarRoot.address() == root.address())
{
m_folder->addItem(i18n("Bookmark Toolbar"),
- rApp->bookmarkManager()->manager()->toolbar().address());
+ toolBarRoot.address());
}
else
{
- m_folder->addItem(rApp->bookmarkManager()->manager()->toolbar().text(),
- rApp->bookmarkManager()->manager()->toolbar().address());
+ m_folder->addItem(toolBarRoot.text(),
+ toolBarRoot.address());
}
m_folder->insertSeparator(1);
- if (m_bookmark->parentGroup().address() != rApp->bookmarkManager()->manager()->toolbar().address())
+ if (m_bookmark->parentGroup().address() != toolBarRoot.address())
{
m_folder->addItem(m_bookmark->parentGroup().text(),
m_bookmark->parentGroup().address());
m_folder->insertSeparator(3);
}
- for (KBookmark bookmark = root.first(); !bookmark.isNull(); bookmark = root.next(bookmark))
+ for (KBookmark bookmark = toolBarRoot.first(); !bookmark.isNull(); bookmark = toolBarRoot.next(bookmark))
{
if (bookmark.isGroup())
{
@@ -266,7 +267,7 @@ void BookmarkWidget::setupFolderComboBox()
}
}
- if (m_bookmark->parentGroup().address() == root.address())
+ if (m_bookmark->parentGroup().address() == toolBarRoot.address())
{
m_folder->setCurrentIndex(0);
}