aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/webview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index e77acc7..9f7385e 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -161,6 +161,14 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
connect(menu->addAction(tr("Copy image URL to clipboard")), &QAction::triggered, this, [this]() {
page()->triggerAction(QWebEnginePage::CopyImageUrlToClipboard);
});
+ if(!ctxdata.mediaUrl().isEmpty()) {
+ connect(menu->addAction(tr("Open image in new tab")), &QAction::triggered, this, [this, ctxdata]() {
+ createWindow(QWebEnginePage::WebBrowserTab)->load(ctxdata.mediaUrl());
+ });
+ connect(menu->addAction(tr("Save image")), &QAction::triggered, this, [this, ctxdata]() {
+ page()->download(ctxdata.mediaUrl());
+ });
+ }
} else {
delete menu;