Merge #18091: Qt: pass clientmodel changes from walletframe to walletviews

2af3e16ca917acd85c2d4f709f6d486519d6af0d Qt: pass clientmodel changes from walletframe to walletviews (Jonas Schnelli)

Pull request description:

  Fixes #18090

  We currently don't pass `clientmodel` changes from the `walletframe` to the `walletviews` leading to possible invalid access during shutdown because all walletviews miss the nullifying of the clientmodel.

  TODO: needs investigation if this is should be backported.

ACKs for top commit:
  laanwj:
    Good catch, code review ACK 2af3e16ca917acd85c2d4f709f6d486519d6af0d

Tree-SHA512: f8c0a114f01deac07fb311112d144f3bfc1c1882dd19e8742b372dd597d7a5d59cd0af99fc50494de2334cad98d6701675317474e40fe8820d04c058aeca1b75
This commit is contained in:
Wladimir J. van der Laan 2020-02-10 12:23:00 +01:00 committed by pasta
parent 9a4636d57d
commit 9cdcdf2c5d

View File

@ -37,6 +37,10 @@ WalletFrame::~WalletFrame()
void WalletFrame::setClientModel(ClientModel *_clientModel)
{
this->clientModel = _clientModel;
for (auto i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i) {
i.value()->setClientModel(_clientModel);
}
}
bool WalletFrame::addWallet(WalletModel *walletModel)