summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/webview.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index ce7378de..2273dcb5 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -125,10 +125,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
QWebHitTestResult result = page()->mainFrame()->hitTestContent(event->pos());
MainWindow *mainwindow = Application::instance()->mainWindow();
- QAction *addBookmarkAction = Application::bookmarkProvider()->actionByName("add_bookmark_payload");
- addBookmarkAction->setText(i18n("Bookmark This Page"));
- addBookmarkAction->setData(QVariant());
-
KMenu menu(this);
// link actions
@@ -203,6 +199,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
if (!linkIsEmpty)
{
menu.addSeparator();
+ QAction *addBookmarkAction = Application::bookmarkProvider()->actionByName("add_bookmark_payload");
addBookmarkAction->setData(result.linkUrl());
addBookmarkAction->setText(i18n("&Bookmark This Link"));
menu.addAction(addBookmarkAction);
@@ -252,9 +249,11 @@ void WebView::keyPressEvent(QKeyEvent *event)
QWebView::keyPressEvent(event);
}
+
void WebView::mousePressEvent(QMouseEvent *event)
{
- switch(event->button()) {
+ switch(event->button())
+ {
case Qt::XButton1:
triggerPageAction(QWebPage::Back);
break;