Skip to content
Permalink
Browse files

CertView: do not use Qt::PlainText for qlExpiry - it needs HTML for i…

…ts expiry warning color.
  • Loading branch information...
mkrautz committed May 12, 2014
1 parent 73a1a98 commit d58990c374502cfdd4a5f2bd8dbd490f19e9e511
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/mumble/Cert.cpp
@@ -78,7 +78,6 @@ CertView::CertView(QWidget *p) : QGroupBox(p) {
grid->addWidget(l, 3, 0, 1, 1, Qt::AlignLeft);

qlExpiry = new QLabel();
qlExpiry->setTextFormat(Qt::PlainText);
qlExpiry->setWordWrap(true);
grid->addWidget(qlExpiry, 3, 1, 1, 1);

@@ -121,7 +120,7 @@ void CertView::setCert(const QList<QSslCertificate> &cert) {
qlSubjectEmail->setText(tr("(none)"));

if (qscCert.expiryDate() <= QDateTime::currentDateTime())
qlExpiry->setText(QString::fromLatin1("<font color=\"red\"><b>%1</b></font>").arg(qscCert.expiryDate().toString(Qt::SystemLocaleDate)));
qlExpiry->setText(QString::fromLatin1("<font color=\"red\"><b>%1</b></font>").arg(Qt::escape(qscCert.expiryDate().toString(Qt::SystemLocaleDate))));
else
qlExpiry->setText(qscCert.expiryDate().toString(Qt::SystemLocaleDate));

0 comments on commit d58990c

Please sign in to comment.
You can’t perform that action at this time.