summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-12 10:45:23 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-27 14:08:44 +0000
commite4361807da9db0609697e7a650947dbf26321cdc (patch)
tree12cfad7238c9ede5703b748a5c42cbf73757472b /examples/webenginewidgets
parent7b02ee95f90a5fa14a9abf3b63d2c84440d76a7b (diff)
Make QQuick contextmenu actions behave like widget counterparts
Updates a two of the context menu actions so they behave like the updated actions in qtwebenginewidgets. Also improves the default label of OpenInThisWindow, since by default there are no other windows. Change-Id: Iac0dc23e8f31598296cba87f93503cefd926983f Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'examples/webenginewidgets')
-rw-r--r--examples/webenginewidgets/browser/webview.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/webenginewidgets/browser/webview.cpp b/examples/webenginewidgets/browser/webview.cpp
index f9e75535f..834e89b7f 100644
--- a/examples/webenginewidgets/browser/webview.cpp
+++ b/examples/webenginewidgets/browser/webview.cpp
@@ -340,6 +340,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
const QList<QAction*> actions = menu->actions();
QList<QAction*>::const_iterator it = qFind(actions.cbegin(), actions.cend(), page()->action(QWebEnginePage::OpenLinkInThisWindow));
if (it != actions.cend()) {
+ (*it)->setText(tr("Open Link in This Window"));
++it;
menu->insertAction(*it, page()->action(QWebEnginePage::OpenLinkInNewWindow));
menu->insertAction(*it, page()->action(QWebEnginePage::OpenLinkInNewTab));