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
@@ -29,21 +29,22 @@ void QtWebView::keyPressEvent(QKeyEvent* event) {
29 event->count()); 29 event->count());
30 QWebView::keyPressEvent(translatedEvent); 30 QWebView::keyPressEvent(translatedEvent);
31 delete translatedEvent; 31 delete translatedEvent;
32} 32}
33 33
34void QtWebView::dragEnterEvent(QDragEnterEvent *event) { 34void QtWebView::dragEnterEvent(QDragEnterEvent*) {
35 35
36} 36}
37 37
38void QtWebView::contextMenuEvent(QContextMenuEvent* ev) { 38void QtWebView::contextMenuEvent(QContextMenuEvent* ev) {
39 QMenu menu(this);
39 QAction* copyLinkAction = pageAction(QWebPage::CopyLinkToClipboard); 40 QAction* copyLinkAction = pageAction(QWebPage::CopyLinkToClipboard);
40 if (copyLinkAction) { 41 if (copyLinkAction) {
41 QMenu menu(this);
42 menu.addAction(copyLinkAction); 42 menu.addAction(copyLinkAction);
43 menu.exec(ev->globalPos());
44 } 43 }
44 menu.addAction("Clear", this, SIGNAL(clearRequested()));
45 menu.exec(ev->globalPos());
45} 46}
46 47
47void QtWebView::focusInEvent(QFocusEvent* event) { 48void QtWebView::focusInEvent(QFocusEvent* event) {
48 QWebView::focusInEvent(event); 49 QWebView::focusInEvent(event);
49 emit gotFocus(); 50 emit gotFocus();