Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/ksslinfodialog.cpp
Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Line(s) | 144 | { | |||
---|---|---|---|---|---|
190 | } | 190 | } | ||
191 | } | 191 | } | ||
192 | 192 | | |||
193 | void KSslInfoDialog::displayFromChain(int i) | 193 | void KSslInfoDialog::displayFromChain(int i) | ||
194 | { | 194 | { | ||
195 | const QSslCertificate &cert = d->certificateChain[i]; | 195 | const QSslCertificate &cert = d->certificateChain[i]; | ||
196 | 196 | | |||
197 | QString trusted; | 197 | QString trusted; | ||
198 | if (!d->certificateErrors[i].isEmpty()) { | 198 | const QList<KSslError::Error> errorsList = d->certificateErrors[i]; | ||
199 | if (!errorsList.isEmpty()) { | ||||
199 | trusted = i18nc("The certificate is not trusted", "NO, there were errors:"); | 200 | trusted = i18nc("The certificate is not trusted", "NO, there were errors:"); | ||
200 | foreach (KSslError::Error e, d->certificateErrors[i]) { | 201 | for (KSslError::Error e : errorsList) { | ||
201 | KSslError classError(e); | 202 | KSslError classError(e); | ||
202 | trusted += QLatin1Char('\n') + classError.errorString(); | 203 | trusted += QLatin1Char('\n') + classError.errorString(); | ||
203 | } | 204 | } | ||
204 | } else { | 205 | } else { | ||
205 | trusted = i18nc("The certificate is trusted", "Yes"); | 206 | trusted = i18nc("The certificate is trusted", "Yes"); | ||
206 | } | 207 | } | ||
207 | d->ui.trusted->setText(trusted); | 208 | d->ui.trusted->setText(trusted); | ||
208 | 209 | | |||
Show All 34 Lines |