When searching on LDAP there is a problem that GPGME returns keys which have a keyid set but the primaryFingerprint is NULL.
Kleopatra throughout the models and views always assumes that fingerprint is not null for a valid key and uses this for example in maps and sets as the primary identifier for a key. This results in the search only showing one key because kleopatra deduplicates them based on the fingerprint.
As a workaround GPGME could return the keyID when no fingerprint is available for primaryFingerprint. This would in my opinion fit with primaryFingerprint meaning "The best primary identifier available for this key."
But I am not really happy with that because then "primaryFingerprint" in GpgME++ would be decoupled from the fingerprint value of the C API and so maybe this is better handled on an even lower level e.g. in GpgME's keylist parsing code?
I'm not really happy about changing kleopatra everywhere to use the keyid instead of the fingerprint internally because of this issue.