Prevent tab focus from wrapping endlessly
authorLiang Qi <liang.qi@digia.com>
Mon, 27 May 2013 08:19:35 +0000 (10:19 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 27 May 2013 18:05:53 +0000 (20:05 +0200)
commit63f83fbd095415145ad124c7215f07a4c3c6038f
tree24637099b44ea15b090ce7e857583c4ed3a03831
parente2e5ba2ce28cb3d666bd1037506c081fa9165611
Prevent tab focus from wrapping endlessly

If there was no item that accepted focus, it would go into an
endless loop.

This also changes the default behavior of QQuickWindow. When there is not
any activeFocusItem in the whole window, it means the contentItem got
focused. The Tab/BackTab key will now focus the next item in the tab focus
chain.

Autotest is included.

Done-with: Frederik Gladhorn <frederik.gladhorn@digia.com>
Task-number: QTBUG-31344
Change-Id: I854292f89a327c493eec21969907c94aa9cfddcb
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
src/quick/items/qquickitem.cpp
tests/auto/quick/qquickitem2/data/activeFocusOnTab7.qml [new file with mode: 0644]
tests/auto/quick/qquickitem2/data/activeFocusOnTab8.qml [new file with mode: 0644]
tests/auto/quick/qquickitem2/tst_qquickitem.cpp