Add a class to represent a tag

PR #20028.
Closes #19744.
This commit is contained in:
Vladimir Golovnev
2023-12-05 17:01:09 +03:00
committed by GitHub
parent 65771d66fc
commit 7a41192597
38 changed files with 421 additions and 251 deletions

View File

@@ -363,7 +363,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::TorrentDescriptor &to
connect(m_ui->categoryComboBox, &QComboBox::currentIndexChanged, this, &AddNewTorrentDialog::categoryChanged);
m_ui->tagsLineEdit->setText(m_torrentParams.tags.join(u", "_s));
m_ui->tagsLineEdit->setText(QStringList(m_torrentParams.tags.cbegin(), m_torrentParams.tags.cend()).join(u", "_s));
connect(m_ui->tagsEditButton, &QAbstractButton::clicked, this, [this]
{
auto *dlg = new TorrentTagsDialog(m_torrentParams.tags, this);
@@ -371,7 +371,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::TorrentDescriptor &to
connect(dlg, &TorrentTagsDialog::accepted, this, [this, dlg]
{
m_torrentParams.tags = dlg->tags();
m_ui->tagsLineEdit->setText(m_torrentParams.tags.join(u", "_s));
m_ui->tagsLineEdit->setText(QStringList(m_torrentParams.tags.cbegin(), m_torrentParams.tags.cend()).join(u", "_s));
});
dlg->open();
});