diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2010-06-10 23:40:55 +0200 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2010-06-10 23:40:55 +0200 |
commit | c2fbdae0e265709f50e2982ce60903e13edaef2e (patch) | |
tree | 666028274200f2992ea4809ec48e8ca2b225f541 /src | |
parent | remove setAutoFillBackground(true) => propagate ListItem content to engineBar (diff) | |
download | rekonq-c2fbdae0e265709f50e2982ce60903e13edaef2e.tar.xz |
Fix bookmark tool button with different windows
Fix the bookmark editor's action which is displayed twice
BUG: 241337
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks/bookmarksmanager.cpp | 10 | ||||
-rw-r--r-- | src/bookmarks/bookmarksmanager.h | 1 |
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; |