@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 
}
        std::map<CKeyID, CKey> privkey_map;
        for (size_t i = 0; i < keys.size(); ++i) {
            const auto& str = keys[i].get_str();
            CKey key = DecodeSecret(str);
            if (!key.IsValid()) {
                throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key encoding");
            }
            CPubKey pubkey = key.GetPubKey();
            CKeyID id = pubkey.GetID();
            if (pubkey_map.count(id)) {
                pubkey_map.erase(id);
            }
            privkey_map.emplace(id, key);
        }
        
        if (internal && data.exists("label")) {
            throw JSONRPCError(RPC_INVALID_PARAMETER, "Internal addresses should not have a label");
        }
        
        bool have_solving_data = import_data.redeemscript || import_data.witnessscript || pubkey_map.size() || privkey_map.size();
        if (have_solving_data) {
            
            auto error = RecurseImportData(script, import_data, ScriptContext::TOP);
            
            bool spendable = std::all_of(import_data.used_keys.begin(), import_data.used_keys.end(), [&](const std::pair<CKeyID, bool>& used_key){ return privkey_map.count(used_key.first) > 0; });
            if (!watchOnly && !spendable) {
                warnings.push_back("Some private keys are missing, outputs will be considered watchonly. If this is intentional, specify the watchonly flag.");
            }
            if (watchOnly && spendable) {