mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kio: avoid unnecessary loop in KSslInfoDialog
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
29ca76c4d3
commit
65f28c4d3e
1 changed files with 1 additions and 8 deletions
|
@ -152,14 +152,7 @@ void KSslInfoDialog::setSslInfo(const QList<QSslCertificate> &certificateChain,
|
|||
d->ui.certSelector->clear();
|
||||
for (int i = 0; i < certificateChain.size(); i++) {
|
||||
const QSslCertificate &cert = certificateChain[i];
|
||||
QString name;
|
||||
static const QSslCertificate::SubjectInfo si[] = {
|
||||
QSslCertificate::CommonName,
|
||||
QSslCertificate::Organization,
|
||||
QSslCertificate::OrganizationalUnitName
|
||||
};
|
||||
for (int j = 0; j < 3 && name.isEmpty(); j++)
|
||||
name = cert.subjectInfo(si[j]);
|
||||
QString name = cert.subjectInfo(QSslCertificate::OrganizationalUnitName);
|
||||
d->ui.certSelector->addItem(name);
|
||||
}
|
||||
if (certificateChain.size() < 2) {
|
||||
|
|
Loading…
Add table
Reference in a new issue