Replace complicated function pointer casts with simple lambdas or the QOverload helper. GnuPG-bug-id: 5283