1
0
forked from pool/libqt5-qtbase
libqt5-qtbase/0001-QWidget-setFocusProxy-adjust-focus-widget-properly.patch

32 lines
1.2 KiB
Diff
Raw Normal View History

From c09cf578bd7267b867326101cd2d0f39e7c814fe Mon Sep 17 00:00:00 2001
From: David Faure <david.faure@kdab.com>
Date: Mon, 9 Sep 2019 18:12:26 +0200
Subject: [PATCH] QWidget::setFocusProxy: adjust focus widget properly
My commit 3e7463411e adjusted the focus widget by setting
QApplicationPrivate::focus_widget directly, while there is a method for
doing this properly, including setFocus_sys() and emitting signals.
Fixes: QTBUG-77364
Change-Id: I218acf7a9de39173d282ced46def4f65594f80b4
---
src/widgets/kernel/qwidget.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index cf5a81c204..6889c2e9e5 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -6204,7 +6204,7 @@ void QWidget::setFocusProxy(QWidget * w)
if (changingAppFocusWidget) {
QWidget *newDeepestFocusProxy = d_func()->deepestFocusProxy();
- QApplicationPrivate::focus_widget = newDeepestFocusProxy ? newDeepestFocusProxy : this;
+ QApplicationPrivate::setFocusWidget(newDeepestFocusProxy ? newDeepestFocusProxy : this, Qt::NoFocusReason);
}
}
--
2.22.0