It makes no sense to modify the focus of containment within it's
FocusScope, and activeFocus will be set correctly by code in
QQuickWindow. Especially as it doesn't set it back.
The only way this would make any sense is if someone in Desktop is
incorrectly using "focus" when they mean to use "activeFocus". This code
was introduced to fix a bug in the toolbox (331971) where someone was
making the mistake above.
That toolbox code has been subsequently fixed properly, leaving this as
dead code.