From ada9c2f8f897775b5605cf1799dc0e553627ce54 Mon Sep 17 00:00:00 2001 From: Lu YaNing Date: Mon, 12 Dec 2022 15:26:55 +0800 Subject: [PATCH] QGraphicsProxyWidget: Don't unnecessarily check focusWidget twice Amends commit bf5011815d917e07ae7cf45e5768f1775f70e90d Change-Id: I18a8d26b08b4035d7a76fc51873696590292b181 Reviewed-by: Volker Hilsheimer --- src/widgets/graphicsview/qgraphicsproxywidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp index 60d62c084b..62f207cdf5 100644 --- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp +++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp @@ -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());