Represent by TorrentInfo only info-section related metadata

PR #21084.
This commit is contained in:
Vladimir Golovnev
2024-07-19 06:25:41 +03:00
committed by GitHub
parent 8b7fdf0f22
commit 3b38d0de7f
5 changed files with 23 additions and 164 deletions

View File

@@ -897,11 +897,11 @@ void AddNewTorrentDialog::setupTreeview()
// Set dialog title
setWindowTitle(torrentDescr.name());
const auto &torrentInfo = *torrentDescr.info();
// Set torrent information
m_ui->labelCommentData->setText(Utils::Misc::parseHtmlLinks(torrentInfo.comment().toHtmlEscaped()));
m_ui->labelDateData->setText(!torrentInfo.creationDate().isNull() ? QLocale().toString(torrentInfo.creationDate(), QLocale::ShortFormat) : tr("Not available"));
m_ui->labelCommentData->setText(Utils::Misc::parseHtmlLinks(torrentDescr.comment().toHtmlEscaped()));
m_ui->labelDateData->setText(!torrentDescr.creationDate().isNull() ? QLocale().toString(torrentDescr.creationDate(), QLocale::ShortFormat) : tr("Not available"));
const auto &torrentInfo = *torrentDescr.info();
BitTorrent::AddTorrentParams &addTorrentParams = m_currentContext->torrentParams;
if (addTorrentParams.filePaths.isEmpty())