summaryrefslogtreecommitdiff
path: root/src/bookmarks
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-08-10 17:34:04 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:05 +0100
commit08ca2545eede86a0f6de42be596b063de1321ddb (patch)
tree9f1d9986b04d7db3ace13f9304eae704d9c189eb /src/bookmarks
parentFindBar. Rewamped and restored (diff)
downloadrekonq-08ca2545eede86a0f6de42be596b063de1321ddb.tar.xz
Manage Bookmarks Toolbar show/hide (&& create/delete)
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/bookmarkmanager.cpp4
-rw-r--r--src/bookmarks/bookmarkstoolbar.cpp6
-rw-r--r--src/bookmarks/bookmarkstoolbar.h1
3 files changed, 9 insertions, 2 deletions
diff --git a/src/bookmarks/bookmarkmanager.cpp b/src/bookmarks/bookmarkmanager.cpp
index 7e1b5d90..57464846 100644
--- a/src/bookmarks/bookmarkmanager.cpp
+++ b/src/bookmarks/bookmarkmanager.cpp
@@ -181,7 +181,7 @@ void BookmarkManager::fillBookmarkBar(BookmarkToolBar *toolBar)
{
if (bookmark.isGroup())
{
- KBookmarkActionMenu *menuAction = new KBookmarkActionMenu(bookmark.toGroup(), this);
+ KBookmarkActionMenu *menuAction = new KBookmarkActionMenu(bookmark.toGroup(), toolBar);
menuAction->setDelayed(false);
BookmarkMenu *bMenu = new BookmarkMenu(m_manager, m_owner, menuAction->menu(), bookmark.address());
bMenu->setParent(menuAction->menu());
@@ -198,7 +198,7 @@ void BookmarkManager::fillBookmarkBar(BookmarkToolBar *toolBar)
}
else
{
- KBookmarkAction *action = new KBookmarkAction(bookmark, m_owner, this);
+ KBookmarkAction *action = new KBookmarkAction(bookmark, m_owner, toolBar);
action->setIcon(IconManager::self()->iconForUrl(KUrl(bookmark.url())));
toolBar->addAction(action);
toolBar->widgetForAction(action)->installEventFilter(toolBar);
diff --git a/src/bookmarks/bookmarkstoolbar.cpp b/src/bookmarks/bookmarkstoolbar.cpp
index 2ecb0e35..7a904ef5 100644
--- a/src/bookmarks/bookmarkstoolbar.cpp
+++ b/src/bookmarks/bookmarkstoolbar.cpp
@@ -170,6 +170,12 @@ BookmarkToolBar::BookmarkToolBar(QWidget *parent)
}
+BookmarkToolBar::~BookmarkToolBar()
+{
+ clear();
+}
+
+
void BookmarkToolBar::contextMenu(const QPoint &point)
{
KBookmarkActionInterface *action = dynamic_cast<KBookmarkActionInterface*>(actionAt(point));
diff --git a/src/bookmarks/bookmarkstoolbar.h b/src/bookmarks/bookmarkstoolbar.h
index 97fd7a8f..4098f2a3 100644
--- a/src/bookmarks/bookmarkstoolbar.h
+++ b/src/bookmarks/bookmarkstoolbar.h
@@ -83,6 +83,7 @@ class BookmarkToolBar : public KToolBar
public:
BookmarkToolBar(QWidget *parent);
+ ~BookmarkToolBar();
protected:
bool eventFilter(QObject *watched, QEvent *event);