Migrate away from deprecated Qt functions

`QString QDateTime::toString(Qt::DateFormat format = Qt::TextDate)` will
be removed in Qt6.
This commit is contained in:
Chocobo1 2021-01-06 12:47:18 +08:00
commit cede5ac9d2
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
5 changed files with 11 additions and 11 deletions

View file

@ -655,7 +655,7 @@ void AddNewTorrentDialog::setupTreeview()
// Set torrent information
m_ui->labelCommentData->setText(Utils::Misc::parseHtmlLinks(m_torrentInfo.comment().toHtmlEscaped()));
m_ui->labelDateData->setText(!m_torrentInfo.creationDate().isNull() ? m_torrentInfo.creationDate().toString(Qt::DefaultLocaleShortDate) : tr("Not available"));
m_ui->labelDateData->setText(!m_torrentInfo.creationDate().isNull() ? QLocale().toString(m_torrentInfo.creationDate(), QLocale::ShortFormat) : tr("Not available"));
// Prepare content tree
m_contentModel = new TorrentContentFilterModel(this);