Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX(client): Replace deprecated Qt::SystemLocaleDate and Qt::DefaultLocaleShortDate #6213

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/mumble/Cert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ void CertView::setCert(const QList< QSslCertificate > &cert) {
else
qlSubjectEmail->setText(tr("(none)"));

const auto expiryDateStr = QLocale::system().toString(qscCert.expiryDate(), QLocale::ShortFormat);

if (qscCert.expiryDate() <= QDateTime::currentDateTime())
qlExpiry->setText(QString::fromLatin1("<font color=\"red\"><b>%1</b></font>")
.arg(qscCert.expiryDate().toString(Qt::SystemLocaleDate).toHtmlEscaped()));
qlExpiry->setText(
QString::fromLatin1("<font color=\"red\"><b>%1</b></font>").arg(expiryDateStr.toHtmlEscaped()));
else
qlExpiry->setText(qscCert.expiryDate().toString(Qt::SystemLocaleDate));
qlExpiry->setText(expiryDateStr);
Krzmbrzl marked this conversation as resolved.
Show resolved Hide resolved

if (qlCert.count() > 1)
qscCert = qlCert.last();
Expand Down
2 changes: 1 addition & 1 deletion src/mumble/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ void Log::log(MsgType mt, const QString &console, const QString &terse, bool own
qdDate = dt.date();
tc.insertBlock();
tc.insertHtml(
tr("[Date changed to %1]\n").arg(qdDate.toString(Qt::DefaultLocaleShortDate).toHtmlEscaped()));
tr("[Date changed to %1]\n").arg(QLocale().toString(qdDate, QLocale::ShortFormat).toHtmlEscaped()));
tc.movePosition(QTextCursor::End);
}

Expand Down