@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 
if (fPruneMode)
        throw JSONRPCError(RPC_WALLET_ERROR, "Importing wallets is disabled in pruned mode");
    WalletRescanReserver reserver(pwallet);
    if (!reserver.reserve()) {
        throw JSONRPCError(RPC_WALLET_ERROR, "Wallet is currently rescanning. Abort existing rescan or wait.");
    }
    int64_t nTimeBegin = 0;
    bool fGood = true;
    {
        auto locked_chain = pwallet->chain().lock();
        LOCK(pwallet->cs_wallet);
        EnsureWalletIsUnlocked(pwallet);
        fsbridge::ifstream file;
        file.open(request.params[0].get_str(), std::ios::in | std::ios::ate);
        if (!file.is_open()) {
            throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file");
        }
        Optional<int> tip_height = locked_chain->getHeight();
        nTimeBegin = tip_height ? locked_chain->getBlockTime(*tip_height) : 0;
        int64_t nFilesize = std::max((int64_t)1, (int64_t)file.tellg());
        file.seekg(0, file.beg);
        
        
        uiInterface.ShowProgress(strprintf("%s " + _("Importing..."), pwallet->GetDisplayName()), 0, false); 
        while (file.good()) {
            uiInterface.ShowProgress("", std::max(1, std::min(99, (int)(((double)file.tellg() / (double)nFilesize) * 100))), false);
            std::string line;
            std::getline(file, line);
            if (line.empty() || line[0] == '#')
                continue;