diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-22 14:09:41 +0200 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-22 14:09:41 +0200 |
commit | c18a4bf0e5561ec97ef299a0992f267905021c66 (patch) | |
tree | 175dad967c505246892de49ca03bc3a6a7deacd8 /src/bookmarks/bookmarkprovider.cpp | |
parent | rekonq 0.5.80 AKA 0.6 beta (diff) | |
download | rekonq-c18a4bf0e5561ec97ef299a0992f267905021c66.tar.xz |
- Move the BK bar context menu slot and connection to BookmarkContextMenu
- The context menu now works without selected bookmark in the BK bar
Diffstat (limited to 'src/bookmarks/bookmarkprovider.cpp')
-rw-r--r-- | src/bookmarks/bookmarkprovider.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/bookmarks/bookmarkprovider.cpp b/src/bookmarks/bookmarkprovider.cpp index 41704f58..7bfb608b 100644 --- a/src/bookmarks/bookmarkprovider.cpp +++ b/src/bookmarks/bookmarkprovider.cpp @@ -109,8 +109,6 @@ void BookmarkProvider::registerBookmarkBar(BookmarkToolBar *toolbar) kDebug() << "new bookmark bar..."; m_bookmarkToolBars.append(toolbar); - toolbar->toolBar()->setContextMenuPolicy(Qt::CustomContextMenu); - connect(toolbar->toolBar(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(contextMenu(const QPoint&))); kDebug() << "new bookmark bar... DONE!"; } @@ -183,24 +181,6 @@ KBookmark BookmarkProvider::bookmarkForUrl(const KUrl &url) } -void BookmarkProvider::contextMenu(const QPoint &point) -{ - if (m_bookmarkToolBars.isEmpty()) - return; - - KToolBar *bookmarkToolBar = m_bookmarkToolBars.at(0)->toolBar(); - if (!bookmarkToolBar) - return; - - KBookmarkActionInterface *action = dynamic_cast<KBookmarkActionInterface*>(bookmarkToolBar->actionAt(point)); - if (!action) - return; - - BookmarksContextMenu menu(action->bookmark(), bookmarkManager(), bookmarkOwner()); - menu.exec(bookmarkToolBar->mapToGlobal(point)); -} - - void BookmarkProvider::slotBookmarksChanged(const QString& /*groupAddress*/, const QString& /*caller*/) { foreach(BookmarkToolBar *bookmarkToolBar, m_bookmarkToolBars) |