qt: Do not pass WalletModel* to a queued connection
Summary:
On master, the following queued connection
connect(this, &RPCConsole::cmdRequest, executor, &RPCExecutor::request);
uses a const WalletModel* parameter regardless whether the ENABLE_WALLET macro is defined.
Although this code works in Qt 5, it is flawed. On Qt 6, the code gets broken because the fully defined WalletModel type is required which is not the case if ENABLE_WALLET is undefined.
Guard RPCConsole::{add,remove}Wallet() with ENABLE_WALLET
Make RPCExecutor* a member of the RPCConsole class
Do not pass WalletModel* to queued connection
This is a backport of core-gui#589
Depends on D18163
Test Plan:
ninja all check-all
Run a wallet RPC command in the console
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18164