summaryrefslogtreecommitdiff
path: root/src/bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/bookmarksmanager.cpp10
-rw-r--r--src/bookmarks/bookmarksmanager.h1
2 files changed, 5 insertions, 6 deletions
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
index 4e097d94..396d5bdc 100644
--- a/src/bookmarks/bookmarksmanager.cpp
+++ b/src/bookmarks/bookmarksmanager.cpp
@@ -213,6 +213,7 @@ QAction * BookmarkMenu::actionForBookmark(const KBookmark &bookmark)
void BookmarkMenu::refill()
{
+ clear();
fillBookmarks();
if (parentMenu()->actions().count() > 0)
@@ -268,7 +269,6 @@ BookmarkProvider::BookmarkProvider(QObject *parent)
, m_manager(0)
, m_owner(0)
, m_actionCollection(new KActionCollection(this))
- , m_bookmarkMenu(0)
, m_completion(0)
, _bookmarkActionMenu(0)
{
@@ -309,7 +309,6 @@ BookmarkProvider::BookmarkProvider(QObject *parent)
BookmarkProvider::~BookmarkProvider()
{
- delete m_bookmarkMenu;
delete m_actionCollection;
delete m_owner;
delete m_manager;
@@ -397,11 +396,12 @@ KActionMenu* BookmarkProvider::bookmarkActionMenu(QWidget *parent)
void BookmarkProvider::triggerBookmarkMenu()
{
kDebug() << "triggering Bookmarks Menu...";
- if(!m_bookmarkMenu)
+ KMenu *menu = qobject_cast<KMenu *>(sender());
+
+ if(menu->actions().count() == 0)
{
- KMenu *menu = qobject_cast<KMenu *>(sender());
kDebug() << "new Bookmarks Menu...";
- m_bookmarkMenu = new BookmarkMenu(m_manager, m_owner, menu, m_actionCollection);
+ new BookmarkMenu(m_manager, m_owner, menu, m_actionCollection);
kDebug() << "new Bookmarks Menu...DONE";
}
}
diff --git a/src/bookmarks/bookmarksmanager.h b/src/bookmarks/bookmarksmanager.h
index 0087c600..67e54be2 100644
--- a/src/bookmarks/bookmarksmanager.h
+++ b/src/bookmarks/bookmarksmanager.h
@@ -273,7 +273,6 @@ private:
KBookmarkManager *m_manager;
BookmarkOwner *m_owner;
KActionCollection *m_actionCollection;
- BookmarkMenu *m_bookmarkMenu;
QList<KToolBar*> m_bookmarkToolBars;
AwesomeUrlCompletion *m_completion;