In commit “qt: Ignore QEvent::Quit
until full initialization” (d4227f7449d080f1a30e97847ef8d73d18bf872d)
This seems like a pretty indirect way of preventing requestShutdown() from running before initializeResult() so splashscreen will be deleted before the wallet and won’t hold dangling references to the wallet.
It also seems pretty fragile, because this is just one requestShutdown() caller when there could be other callers now or in the future that fail to delete the splash screen before calling requestShutdown.
Also the commit seems to make code more complicated. There are no comments to explain the logic, and the commit message just has a vague message about requestShutdown being error prune, not saying why it is (or should be) error prone.
I think a better approach here would just to make the requestShutdown method delete splash screen and wallet at the same time, so requestShutdown calls are not error-prone and don’t need to be avoided like this. Something like
0delete m_splash;
1m_splash = nullptr;
2delete m_wallet_controller;
3m_wallet_controller = nullptr;
in requestShutdown like achow originally proposed https://github.com/bitcoin/bitcoin/issues/25146#issuecomment-1129356954 would make sense I think.
Additionally, it does seem good to delete the splash screen in initializeResult
as you are doing in your first commit “qt: Delete splash screen widget early” (c7d24585080b3c22a56dfae600d0570b12a0537a), since that also makes sense and simplifiies code. In both cases I think it’s good to delete the splash screen as soon as the splash screen is no longer needed.