From a16d2ea4c0f44a99d001a387ab31dffe6a1ed992 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sat, 27 Jul 2019 22:06:08 +0800 Subject: [PATCH] recover WebView context menu --- src/vwebview.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/vwebview.cpp b/src/vwebview.cpp index 0dd8a01f..b1d6384f 100644 --- a/src/vwebview.cpp +++ b/src/vwebview.cpp @@ -53,7 +53,7 @@ void VWebView::contextMenuEvent(QContextMenuEvent *p_event) const QList actions = menu->actions(); QAction *firstAction = actions.isEmpty() ? NULL : actions[0]; - bool selection = hasSelection(); + bool selection = hasSelection() && !selectedText().isEmpty(); #if defined(Q_OS_WIN) if (!m_copyImageUrlActionHooked) { @@ -99,11 +99,6 @@ void VWebView::contextMenuEvent(QContextMenuEvent *p_event) menu->insertSeparator(firstAction); } } - - QAction *savePageAct = new QAction(QWebPage::tr("Save &Page"), menu); - connect(savePageAct, &QAction::triggered, - this, &VWebView::requestSavePage); - menu->addAction(savePageAct); } }