Go to file
Andreas Aardal Hanssen d6f2d8dcb6 Make sure panels always gain focus when activated or tab is pressed.
This changes behavior, but I would argue it's a good change. If you
create a panel and activate it (e.g., by simply showing it or reparenting
it onto an already-visible item), you expect the panel to gain focus /
which is sort of the whole point of activating it. Prior to this change,
you had to have explicitly called setFocus() on one of the panel's
children, which would give that item subfocus, for that item to auto-
gain focus when the panel was activated. This change makes it more
automatic. If the panel itself or any of the widgets in its focus chain
can gain focus, they will gain focus when the panel is activated.

So the new logic is - if the panel already has a focus item, so if
someone explicitly set subfocus on an item before the panel is shown,
that item gets focus. Otherwise, if the panel itself can gain focus
(e.g., someone makes a line edit / text edit panel), it gains focus
when activated. Otherwise, we search the focus chain until we find
the first item that can gain focus. This last case is the file dialog
case, where the dialog itself can't gain focus but typically the
first item in the focus chain is the primary focus widget, such as
the search field or the directory list view.

The change also fixes this for the first Tab. If you clear focus on
a panel, the user expects to be able to press Tab to regain focus.
Prior to this change that didn't happen. Now, the panel or the first
in the focus chain that can get focus gets focus on first tab.

Task-number: QTBUG-28194
Change-Id: Id7ec1741d0d5eb4ea845469909c8d684e14017f1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-12-17 08:58:04 +01:00
bin fixqt4headers: Remove QtQuick1 and add QtMultimedia 2012-11-28 16:21:57 +01:00
config.tests Add configure option to minimize xcb runtime dependencies 2012-11-07 16:55:50 +01:00
dist Add an empty dist/changes-5.1.0 file 2012-12-05 18:55:43 +01:00
doc Added \ingroup and \brief qdoc tags to IPC examples. 2012-12-01 08:31:04 +01:00
examples add auto-detect system language in i18n example 2012-12-12 23:34:19 +01:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs QNX: adjust settings for separate debug info feature 2012-12-13 17:45:32 +01:00
qmake Remove duplicate libraries added via prl files in Windows 2012-11-30 08:22:35 +01:00
src Make sure panels always gain focus when activated or tab is pressed. 2012-12-17 08:58:04 +01:00
tests Make sure panels always gain focus when activated or tab is pressed. 2012-12-17 08:58:04 +01:00
tools Moving the remaining variables assignments from .qmake.cache to qmodule.pri 2012-11-30 21:57:49 +01:00
util More changes from Nokia to Digia 2012-11-30 00:50:47 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Fix docs for Drag and Drop examples 2012-11-30 18:37:35 +01:00
.qmake.conf add a .qmake.conf file which load()s qt_build_config 2012-10-18 17:42:40 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Fix -largefile option in configure 2012-11-28 16:21:57 +01:00
configure.bat Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
header.BSD Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
header.FDL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
header.LGPL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
header.LGPL-ONLY Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
INSTALL fix links in INSTALL 2012-10-10 08:45:22 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.PREVIEW.COMMERCIAL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtbase.pro rewrite default spec handling 2012-11-01 20:17:57 +01:00
sync.profile Provide the bundled zlib headers for external access 2012-11-28 16:21:57 +01:00