summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-05 12:59:02 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-05 12:59:02 (GMT)
commit89f18c8af344fc94bb5cf19035c74385d1c9df9c (patch)
treed215e1ad1267431ea10d511d6f429985b5bf2800 /Swift/QtUI/QtWebView.cpp
parent5b974445a8ce78ca73bdfae9a8114857e4fc3d36 (diff)
downloadswift-89f18c8af344fc94bb5cf19035c74385d1c9df9c.zip
swift-89f18c8af344fc94bb5cf19035c74385d1c9df9c.tar.bz2
Added "Clear" context menu for chat log.
Resolves: #225
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) {