diff options
author | Axel Spoerl <axel.spoerl@qt.io> | 2024-03-08 17:15:03 +0100 |
---|---|---|
committer | Axel Spoerl <axel.spoerl@qt.io> | 2024-03-18 17:21:22 +0100 |
commit | 268fa11eef8834f752a0369a467aa0269a509c8b (patch) | |
tree | 95bd5169109da6cd8df33b7755f67fe37343a0df /src/widgets | |
parent | e7ddd490cf44ecd1c59b3798294ed2812fc5a940 (diff) |
QApplication: use focus abstraction instead of QWidget::focus_next/prev
Focus abstraction in QWidgetPrivate makes direct access to
QWidget::focus_next and focus_prev an antipattern.
Remove usage.
Task-number: QTBUG-121478
Change-Id: Iaab97024c20b97a0d9850dce43816a432d4bc7a1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 6925ee8909..de7d93ce20 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1969,7 +1969,7 @@ QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool f = toplevel; QWidget *w = f; - QWidget *test = f->d_func()->focus_next; + QWidget *test = f->nextInFocusChain(); bool seenWindow = false; bool focusWidgetAfterWindow = false; while (test && test != f) { @@ -2000,7 +2000,7 @@ QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool if (next) break; } - test = test->d_func()->focus_next; + test = test->nextInFocusChain(); } if (wrappingOccurred != nullptr) |