@jonasschnelli wrote in #14979:
> #14573 broke < Qt5.6 compatibility due to calling the lambda version of `addAction` that was added in Qt5.6.

We currently [support](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) QT >=5.2, but hardly anyone tests with that. If we make one of the Travis machines use it, we should have a better change of catching this.

See also discussion about minimum QT version in #13478 
{
    LOCK(cs_wallets);
    for (const std::shared_ptr<CWallet>& wallet : vpwallets) {
        if (wallet->GetName() == name) return wallet;
    }
    return nullptr;
}
static Mutex g_wallet_release_mutex;
static std::condition_variable g_wallet_release_cv;
static std::set<CWallet*> g_unloading_wallet_set;
static void ReleaseWallet(CWallet* wallet)
{
    
    
    wallet->WalletLogPrintf("Releasing wallet\n");
    wallet->BlockUntilSyncedToCurrentChain();
    wallet->Flush();
    UnregisterValidationInterface(wallet);
    delete wallet;
    
    {
        LOCK(g_wallet_release_mutex);
        if (g_unloading_wallet_set.erase(wallet) == 0) {
            
            return;
        }
    }
    g_wallet_release_cv.notify_all();
}
void UnloadWallet(std::shared_ptr<CWallet>&& wallet)