diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-07-11 17:28:20 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-07-11 17:30:05 +0200 |
commit | f5424d18c2050023f62dd92e97f882056c09e00f (patch) | |
tree | 619356ce2626d4b8f5c442bcec1f4e2a6e31df3c /src/webview.cpp | |
parent | Full url selection on double click. (diff) | |
download | rekonq-f5424d18c2050023f62dd92e97f882056c09e00f.tar.xz |
syntax fix and addBookmark Action created just if necessary
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 9 |
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; |