summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-01-25 00:48:48 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-01-29 19:57:02 +0100
commit78edc18057d04a8329060b52d78833711bcadf39 (patch)
tree5d8cf8cee11a6e3f8a84b1cc5265addf8ed511a6 /src
parent382619de6592ff9583504bd31176bf8dc51b0771 (diff)
QGraphicsProxyWidget: fix handling of proxy focus
If a widget inside a QGPW has a proxy focus, the code would keep sending focus in events to the proxy even if the proxy was already focused. Amend the check in place to prevent this from happening. Change-Id: Id28d3bfe4f396da5c9477df713441ca7d506662f Fixes: QTBUG-51856 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index c389c4ab4d..8ec7f7e072 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -6309,7 +6309,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
previousProxyFocus = topData->proxyWidget->widget()->focusWidget();
if (previousProxyFocus && previousProxyFocus->focusProxy())
previousProxyFocus = previousProxyFocus->focusProxy();
- if (previousProxyFocus == this && !topData->proxyWidget->d_func()->proxyIsGivingFocus)
+ if (previousProxyFocus == f && !topData->proxyWidget->d_func()->proxyIsGivingFocus)
return;
}
}