QGraphicsProxyWidget: Don't unnecessarily check focusWidget twice

Amends commit bf5011815d

Change-Id: I18a8d26b08b4035d7a76fc51873696590292b181
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Lu YaNing 2022-12-12 15:26:55 +08:00
parent 02f1e72d5a
commit ada9c2f8f8

View File

@ -1401,7 +1401,7 @@ void QGraphicsProxyWidget::focusOutEvent(QFocusEvent *event)
if (QWidget *focusWidget = d->widget->focusWidget()) {
// QTBUG-88016 proxyWidget set QTextEdit(QLineEdit etc.) when input preview text,
// inputMethod should be reset when proxyWidget lost focus
if (focusWidget && focusWidget->testAttribute(Qt::WA_InputMethodEnabled))
if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled))
QApplication::inputMethod()->reset();
d->removeSubFocusHelper(focusWidget, event->reason());