27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
From c09cf578bd7267b867326101cd2d0f39e7c814fe Mon Sep 17 00:00:00 2001
|
|
From: David Faure <david.faure@kdab.com>
|
|
Date: Mon, 09 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
|
|
---
|
|
|
|
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
|
|
index cf5a81c..6889c2e 100644
|
|
--- qtbase/src/widgets/kernel/qwidget.cpp
|
|
+++ qtbase/src/widgets/kernel/qwidget.cpp
|
|
@@ -6204,7 +6204,7 @@
|
|
|
|
if (changingAppFocusWidget) {
|
|
QWidget *newDeepestFocusProxy = d_func()->deepestFocusProxy();
|
|
- QApplicationPrivate::focus_widget = newDeepestFocusProxy ? newDeepestFocusProxy : this;
|
|
+ QApplicationPrivate::setFocusWidget(newDeepestFocusProxy ? newDeepestFocusProxy : this, Qt::NoFocusReason);
|
|
}
|
|
}
|
|
|