right context menu link .

This commit is contained in:
yifang 2021-12-28 21:59:49 +08:00
parent e7218fc12b
commit 0f08026d3f

View file

@ -28,7 +28,7 @@
#include <QWebEngineSettings> #include <QWebEngineSettings>
#include <assert.h> #include <assert.h>
#include <map> #include <map>
#include <QWebEngineContextMenuData>
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
#include <windows.h> #include <windows.h>
#include <QPainter> #include <QPainter>
@ -1716,8 +1716,8 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
QAction * saveImageAction = 0; QAction * saveImageAction = 0;
QAction * saveSoundAction = 0; QAction * saveSoundAction = 0;
//todo url() or lastclickurl ? QWebEngineContextMenuData menuData=r->contextMenuData();
QUrl targetUrl( r->url() ); QUrl targetUrl(menuData.linkUrl());
Contexts contexts; Contexts contexts;
tryMangleWebsiteClickedUrl( targetUrl, contexts ); tryMangleWebsiteClickedUrl( targetUrl, contexts );