Fix button state for SSL certificate check

A copy paste error was introduced in PR #20338.

PR #21659.
This commit is contained in:
Chocobo1 2024-10-23 13:04:16 +08:00 committed by Vladimir Golovnev (Glassez)
parent 063f77bc6c
commit 878d829904
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7

View file

@ -1915,7 +1915,7 @@ Path OptionsDialog::getFilter() const
void OptionsDialog::webUIHttpsCertChanged(const Path &path) void OptionsDialog::webUIHttpsCertChanged(const Path &path)
{ {
const auto readResult = Utils::IO::readFile(path, Utils::Net::MAX_SSL_FILE_SIZE); const auto readResult = Utils::IO::readFile(path, Utils::Net::MAX_SSL_FILE_SIZE);
const bool isCertValid = !Utils::SSLKey::load(readResult.value_or(QByteArray())).isNull(); const bool isCertValid = Utils::Net::isSSLCertificatesValid(readResult.value_or(QByteArray()));
m_ui->textWebUIHttpsCert->setSelectedPath(path); m_ui->textWebUIHttpsCert->setSelectedPath(path);
m_ui->lblSslCertStatus->setPixmap(UIThemeManager::instance()->getScaledPixmap( m_ui->lblSslCertStatus->setPixmap(UIThemeManager::instance()->getScaledPixmap(