mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-06 15:42:32 -06:00
Use std::optional instead of boost::optional
This commit is contained in:
committed by
sledgehammer999
parent
dc464d4d41
commit
dab32f2090
@@ -124,7 +124,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
||||
m_ui->checkBoxRememberLastSavePath->setChecked(rememberLastSavePath);
|
||||
|
||||
m_ui->contentLayoutComboBox->setCurrentIndex(
|
||||
static_cast<int>(m_torrentParams.contentLayout ? *m_torrentParams.contentLayout : session->torrentContentLayout()));
|
||||
static_cast<int>(m_torrentParams.contentLayout.value_or(session->torrentContentLayout())));
|
||||
|
||||
m_ui->sequentialCheckBox->setChecked(m_torrentParams.sequential);
|
||||
m_ui->firstLastCheckBox->setChecked(m_torrentParams.firstLastPiecePriority);
|
||||
|
||||
@@ -354,7 +354,7 @@ void AutomatedRssDownloader::updateEditedRule()
|
||||
addPaused = TriStateBool::False;
|
||||
m_currentRule.setAddPaused(addPaused);
|
||||
|
||||
boost::optional<BitTorrent::TorrentContentLayout> contentLayout;
|
||||
std::optional<BitTorrent::TorrentContentLayout> contentLayout;
|
||||
if (m_ui->comboContentLayout->currentIndex() > 0)
|
||||
contentLayout = static_cast<BitTorrent::TorrentContentLayout>(m_ui->comboContentLayout->currentIndex() - 1);
|
||||
m_currentRule.setTorrentContentLayout(contentLayout);
|
||||
|
||||
Reference in New Issue
Block a user