mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Add copy image option in context menu (#2058)
This commit is contained in:
parent
5085111657
commit
81aab60023
@ -439,6 +439,11 @@ void WebView::copyLinkToClipboard()
|
||||
}
|
||||
}
|
||||
|
||||
void WebView::copyImageToClipboard()
|
||||
{
|
||||
triggerPageAction(QWebEnginePage::CopyImageToClipboard);
|
||||
}
|
||||
|
||||
void WebView::downloadLinkToDisk()
|
||||
{
|
||||
triggerPageAction(QWebEnginePage::DownloadLinkToDisk);
|
||||
@ -735,6 +740,7 @@ void WebView::createImageContextMenu(QMenu* menu, const WebHitTestResult &hitTes
|
||||
connect(act, SIGNAL(triggered()), this, SLOT(openActionUrl()));
|
||||
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(userDefinedOpenUrlInNewTab()));
|
||||
menu->addAction(act);
|
||||
menu->addAction(tr("Copy image"), this, SLOT(copyImageToClipboard()));
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("Copy image ad&dress"), this, SLOT(copyLinkToClipboard()))->setData(hitTest.imageUrl());
|
||||
menu->addSeparator();
|
||||
menu->addAction(QIcon::fromTheme("document-save"), tr("&Save image as..."), this, SLOT(downloadImageToDisk()));
|
||||
|
@ -120,6 +120,7 @@ protected slots:
|
||||
void openUrlInNewWindow();
|
||||
void sendLinkByMail();
|
||||
void copyLinkToClipboard();
|
||||
void copyImageToClipboard();
|
||||
void downloadLinkToDisk();
|
||||
void downloadImageToDisk();
|
||||
void downloadMediaToDisk();
|
||||
|
Loading…
Reference in New Issue
Block a user