Forward-declare X509 structure even when Qt ssl support is available but ssl-dev is not available. Without this an error "X509 has not been declared" is reported by the compiler.
Unfortunately it would take some time to determine what changed that made this mandatory for me. Maybe some header changed in the hierarchy and the declaration is no more included anymore? Anyway, I cannot build it without declaring it. I'm building in docker using kdeneon/plasma:dev-unstable.
The reason I don't like it, is that X509 isn't a class ;-)
Here in ksslconfig.h (generated file) I have #define KSSL_HAVE_SSL 1. Why is find_package(OpenSSL) failing for you? Any output from cmake?
When QT_NO_OPENSSL is defined, I see that X509 was declared as a class, so I used the same instruction.
In ksslconfig.h I have #define KSSL_HAVE_SSL 0. I don't know if I can recovery much more output, the build succeeded days ago.
Unfortunately I'm not an expert of this section, but I see that libssl-dev is not installed. Maybe that made find() fail?
In any case, if that dep is optional, I guess the build is not supposed to fail, is it?
OK, now we're getting somewhere.
If ssl-dev isn't installed, this code is compiled without SSL support, and fails
ksslcertificate.h:387:18: error: ‘X509’ has not been declared void setCert(X509 *c); ^~~~
The implementation uses KSSL_HAVE_SSL around any use of X509, so the forward declaration is just for the headers to compile.
Can you just add a note in the commit log that this is for the case where the openssl headers are missing.