Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/jobuidelegate.cpp
Show First 20 Lines • Show All 356 Lines • ▼ Show 20 Line(s) | 356 | if (decodedOk) { | |||
---|---|---|---|---|---|
357 | result = 1; // whatever | 357 | result = 1; // whatever | ||
358 | kid->setSslInfo(certChain, | 358 | kid->setSslInfo(certChain, | ||
359 | sslMetaData.value(QStringLiteral("ssl_peer_ip")), | 359 | sslMetaData.value(QStringLiteral("ssl_peer_ip")), | ||
360 | text, // the URL | 360 | text, // the URL | ||
361 | sslMetaData.value(QStringLiteral("ssl_protocol_version")), | 361 | sslMetaData.value(QStringLiteral("ssl_protocol_version")), | ||
362 | sslMetaData.value(QStringLiteral("ssl_cipher")), | 362 | sslMetaData.value(QStringLiteral("ssl_cipher")), | ||
363 | sslMetaData.value(QStringLiteral("ssl_cipher_used_bits")).toInt(), | 363 | sslMetaData.value(QStringLiteral("ssl_cipher_used_bits")).toInt(), | ||
364 | sslMetaData.value(QStringLiteral("ssl_cipher_bits")).toInt(), | 364 | sslMetaData.value(QStringLiteral("ssl_cipher_bits")).toInt(), | ||
365 | KSslInfoDialog::errorsFromString(sslMetaData.value(QStringLiteral("ssl_cert_errors")))); | 365 | KSslInfoDialog::certificateErrorsFromString(sslMetaData.value(QStringLiteral("ssl_cert_errors")))); | ||
ahmadsamir: Nitpick, wouldn't QLatin1String be better here?
c.f. Marc Mutz's talk about QStringLiteral and… | |||||
sslMetaData is a QMap<QString, ...>, ie. value() has no QLatin1String overload, calling it with a QLatin1String will work but convert to a QString at runtime (involving a memory allocation), using QStringLiteral avoids that. vkrause: sslMetaData is a QMap<QString, ...>, ie. value() has no QLatin1String overload, calling it with… | |||||
ahmadsamir: Right, value() is what matters here, thanks for explaining. | |||||
366 | kid->exec(); | 366 | kid->exec(); | ||
367 | } else { | 367 | } else { | ||
368 | result = -1; | 368 | result = -1; | ||
369 | KMessageBox::information(window(), | 369 | KMessageBox::information(window(), | ||
370 | i18n("The peer SSL certificate chain appears to be corrupt."), | 370 | i18n("The peer SSL certificate chain appears to be corrupt."), | ||
371 | i18n("SSL"), QString(), options); | 371 | i18n("SSL"), QString(), options); | ||
372 | } | 372 | } | ||
373 | // KSslInfoDialog deletes itself (Qt::WA_DeleteOnClose). | 373 | // KSslInfoDialog deletes itself (Qt::WA_DeleteOnClose). | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |
Nitpick, wouldn't QLatin1String be better here?
c.f. Marc Mutz's talk about QStringLiteral and QLatin1String: https://youtu.be/Ov7s0GgBbOQ?t=2806