summaryrefslogtreecommitdiffstats
path: root/src/webengine/api
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2017-10-03 13:14:58 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2017-11-03 13:15:21 +0000
commitef1d61a3516182b0a39330b5ac5988f92c82bc4f (patch)
tree59144953d5351ee018e275e0f85ec4a5c4868e00 /src/webengine/api
parent7f7af6290a63bdab76855da5866881c8a53f045c (diff)
Pass editor shortcuts to Chromium by ForwardKeyboardEventWithCommands
Moreover, extend the list of supported editor shortcuts and stabilize the corresponding auto test. Task-number: QTBUG-54692 Task-number: QTBUG-54812 Task-number: QTBUG-54221 Task-number: QTBUG-59053 Change-Id: I4dd8230519639ea6e3340992dbb54a609ecfcd91 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/webengine/api')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 3da21fde5..f5d3646d8 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -94,27 +94,6 @@
QT_BEGIN_NAMESPACE
using namespace QtWebEngineCore;
-QQuickWebEngineView::WebAction editorActionForKeyEvent(QKeyEvent* event)
-{
- static struct {
- QKeySequence::StandardKey standardKey;
- QQuickWebEngineView::WebAction action;
- } editorActions[] = {
- { QKeySequence::Cut, QQuickWebEngineView::Cut },
- { QKeySequence::Copy, QQuickWebEngineView::Copy },
- { QKeySequence::Paste, QQuickWebEngineView::Paste },
- { QKeySequence::Undo, QQuickWebEngineView::Undo },
- { QKeySequence::Redo, QQuickWebEngineView::Redo },
- { QKeySequence::SelectAll, QQuickWebEngineView::SelectAll },
- { QKeySequence::UnknownKey, QQuickWebEngineView::NoWebAction }
- };
- for (int i = 0; editorActions[i].standardKey != QKeySequence::UnknownKey; ++i)
- if (event == editorActions[i].standardKey)
- return editorActions[i].action;
-
- return QQuickWebEngineView::NoWebAction;
-}
-
#ifndef QT_NO_ACCESSIBILITY
static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *object)
{
@@ -578,18 +557,6 @@ void QQuickWebEngineViewPrivate::focusContainer()
void QQuickWebEngineViewPrivate::unhandledKeyEvent(QKeyEvent *event)
{
Q_Q(QQuickWebEngineView);
-#ifdef Q_OS_OSX
- if (event->type() == QEvent::KeyPress) {
- QQuickWebEngineView::WebAction action = editorActionForKeyEvent(event);
- if (action != QQuickWebEngineView::NoWebAction) {
- // Try triggering a registered short-cut
- if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcut(event))
- return;
- q->triggerWebAction(action);
- return;
- }
- }
-#endif
if (q->parentItem())
QCoreApplication::sendEvent(q->parentItem(), event);
}