These are separate events which need to be carried out by separate subsystems.
This also cleans up some whitespace and tabs in qt to avoid getting flagged by
the linter.
Current behavior is preserved.
This is extracted from Core PR14605 : https://github.com/bitcoin/bitcoin/pull/14605/commits/7cc2b9f6786f9bc33853220551eed33ca6b7b7b2