@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 
{
    LockAnnotation lock(::cs_main); 
    auto locked_chain = chain().lock();
    LOCK(cs_wallet);
    CAmount balance = 0;
    for (const auto& entry : mapWallet) {
        const CWalletTx& wtx = entry.second;
        const int depth = wtx.GetDepthInMainChain(*locked_chain);
        if (depth < 0 || !CheckFinalTx(*wtx.tx) || wtx.IsImmatureCoinBase(*locked_chain)) {
            continue;
        }
        
        
        CAmount debit = wtx.GetDebit(filter);
        const bool outgoing = debit > 0;
        for (const CTxOut& out : wtx.tx->vout) {
            if (outgoing && IsChange(out)) {
                debit -= out.nValue;
            } else if (IsMine(out) & filter && depth >= minDepth) {
                balance += out.nValue;
            }
        }
        
        if (outgoing) {
            balance -= debit;
        }
    }
    return balance;
}
CAmount CWallet::GetAvailableBalance(const CCoinControl* coinControl) const