summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtWebView.cpp')
-rw-r--r--Swift/QtUI/QtWebView.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swift/QtUI/QtWebView.cpp b/Swift/QtUI/QtWebView.cpp
index 93ecc18..df8479d 100644
--- a/Swift/QtUI/QtWebView.cpp
+++ b/Swift/QtUI/QtWebView.cpp
@@ -31,17 +31,18 @@ void QtWebView::keyPressEvent(QKeyEvent* event) {
delete translatedEvent;
}
-void QtWebView::dragEnterEvent(QDragEnterEvent *event) {
+void QtWebView::dragEnterEvent(QDragEnterEvent*) {
}
void QtWebView::contextMenuEvent(QContextMenuEvent* ev) {
+ QMenu menu(this);
QAction* copyLinkAction = pageAction(QWebPage::CopyLinkToClipboard);
if (copyLinkAction) {
- QMenu menu(this);
menu.addAction(copyLinkAction);
- menu.exec(ev->globalPos());
}
+ menu.addAction("Clear", this, SIGNAL(clearRequested()));
+ menu.exec(ev->globalPos());
}
void QtWebView::focusInEvent(QFocusEvent* event) {