summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-06-10 23:40:55 +0200
committerYoann Laissus <yoann.laissus@gmail.com>2010-06-10 23:40:55 +0200
commitc2fbdae0e265709f50e2982ce60903e13edaef2e (patch)
tree666028274200f2992ea4809ec48e8ca2b225f541
parentremove setAutoFillBackground(true) => propagate ListItem content to engineBar (diff)
downloadrekonq-c2fbdae0e265709f50e2982ce60903e13edaef2e.tar.xz
Fix bookmark tool button with different windows
Fix the bookmark editor's action which is displayed twice BUG: 241337
-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;