For Core, this commit removed a warning when building without the wallet, because the wallet_model nullptr was defined outside of the #ifdef ENABLE_WALLET context. This problem was already fixed by D4661 in Bitcoin ABC.
So this is a simple refactoring that simplifies the code.
Quote from the PR conversation:
accessing the current element of a combox-box using QComboBox::currentData() instead of using the index is possible since Qt 5.2
This is a backport of Core PR17939