@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_wallet);
    WalletBatch batch(*database);
    
    
    
    typedef std::multimap<int64_t, CWalletTx*> TxItems;
    TxItems txByTime;
    for (auto& entry : mapWallet)
    {
        CWalletTx* wtx = &entry.second;
        txByTime.insert(std::make_pair(wtx->nTimeReceived, wtx));
    }
    nOrderPosNext = 0;
    std::vector<int64_t> nOrderPosOffsets;
    for (TxItems::iterator it = txByTime.begin(); it != txByTime.end(); ++it)
    {
        CWalletTx *const pwtx = (*it).second;
        int64_t& nOrderPos = pwtx->nOrderPos;
        if (nOrderPos == -1)
        {
            nOrderPos = nOrderPosNext++;
            nOrderPosOffsets.push_back(nOrderPos);
            if (!batch.WriteTx(*pwtx))
                return DBErrors::LOAD_FAIL;
        }
        else
        {