diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-08-15 15:39:37 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-08-26 18:12:37 +0200 |
commit | 9aff2fbd8606fc312931abd64fd934c665e1e75e (patch) | |
tree | 48695b0e3960829fb09d2a5b9438968b1161b1c9 /src/widgets | |
parent | f85f3acd7878f49f0878644905ca27ceb7bc0775 (diff) |
Send QWindow::focusObjectChanged when clearing widget focus
We do this for QWidget::setFocus(), but were missing a call on clearing
the focus widget. Since QWidgetWindow::focusObject() will fall back to
returning itself if there is no focus widget, we need to pass the
result of window->focusObject() to the change signal instead of 0.
Change-Id: I52a5519a19bb20e74b4a7c2a1abc9d47e2ea1315
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 57169edb9d..8ea43cfb6c 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -6569,6 +6569,11 @@ void QWidget::clearFocus() QAccessible::updateAccessibility(&event); #endif } + + if (QTLWExtra *extra = window()->d_func()->maybeTopData()) { + if (extra->window) + emit extra->window->focusObjectChanged(extra->window->focusObject()); + } } } |