The intention is to check if the certificate could be loaded, and isNull()
is actually the right thing to do. Saves us from dealing with the no-longer
existing isValid() in Qt5, too.
if (isCert) {
QSslCertificate cert = certByFilename(filename);
- if (cert.isValid())
+ if (!cert.isNull())
showCertState(cert);
}
else {
for (int i = 0; i < 2; i++) {
cert = QSslCertificate(certRaw, (QSsl::EncodingFormat)i);
- if (cert.isValid())
+ if (!cert.isNull())
break;
}
return cert;
void IdentityEditWidget::showCertState(const QSslCertificate &cert)
{
- if (!cert.isValid()) {
+ if (cert.isNull()) {
ui.certOrgLabel->setText(tr("No Certificate loaded"));
ui.certCNameLabel->setText(tr("No Certificate loaded"));
ui.clearOrLoadCertButton->setText(tr("Load"));