Use Start/Stop instead of Resume/Pause

PR #20532.

---------

Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru>
This commit is contained in:
thalieht
2024-03-25 18:11:04 +02:00
committed by GitHub
parent f2d6129db3
commit 5d1c249606
70 changed files with 413 additions and 391 deletions

View File

@@ -240,15 +240,15 @@ void AddTorrentParamsWidget::populate()
m_ui->tagsLineEdit->setText(Utils::String::joinIntoString(m_addTorrentParams.tags, u", "_s));
m_ui->startTorrentComboBox->disconnect(this);
m_ui->startTorrentComboBox->setCurrentIndex(m_addTorrentParams.addPaused
? m_ui->startTorrentComboBox->findData(!*m_addTorrentParams.addPaused) : 0);
m_ui->startTorrentComboBox->setCurrentIndex(m_addTorrentParams.addStopped
? m_ui->startTorrentComboBox->findData(!*m_addTorrentParams.addStopped) : 0);
connect(m_ui->startTorrentComboBox, &QComboBox::currentIndexChanged, this, [this]
{
const QVariant data = m_ui->startTorrentComboBox->currentData();
if (!data.isValid())
m_addTorrentParams.addPaused = std::nullopt;
m_addTorrentParams.addStopped = std::nullopt;
else
m_addTorrentParams.addPaused = !data.toBool();
m_addTorrentParams.addStopped = !data.toBool();
});
m_ui->skipCheckingCheckBox->disconnect(this);