summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-07-01 18:19:03 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-01 15:32:52 +0200
commit945f9183ced012960c75e0b0339a328bbbc96ee6 (patch)
treeb39bb2785363a1293d837ce2867f2634a29e0746 /src/webengine
parent4e6cc1d370358354ac1620f7bfc60a4f48bb188a (diff)
Don't use the private QQuickItemPrivate::focusNextPrev
Do what focusNextPrev does internally. Also fix the tab-focus by getting the next item relatively to the delegate (the scopedFocusItem()) instead of the view itself. Change-Id: I0d35a12bd5ef54d69df35b29ccdd55ac2301eec8 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 19e47c900..cfbfe04e7 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -209,7 +209,9 @@ void QQuickWebEngineViewPrivate::runFileChooser(FileChooserMode mode, const QStr
void QQuickWebEngineViewPrivate::passOnFocus(bool reverse)
{
Q_Q(QQuickWebEngineView);
- focusNextPrev(q, !reverse);
+ // The child delegate currently has focus, find the next one from there and give it focus.
+ QQuickItem *next = q->scopedFocusItem()->nextItemInFocusChain(!reverse);
+ next->forceActiveFocus(reverse ? Qt::BacktabFocusReason : Qt::TabFocusReason);
}
void QQuickWebEngineViewPrivate::titleChanged(const QString &title)