mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Fix strip torrent root folder
This commit is contained in:
@@ -96,7 +96,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent)
|
||||
connect(ui->savePathComboBox, SIGNAL(currentIndexChanged(int)), SLOT(onSavePathChanged(int)));
|
||||
connect(ui->browseButton, SIGNAL(clicked()), SLOT(browseButton_clicked()));
|
||||
ui->defaultSavePathCheckBox->setVisible(false); // Default path is selected by default
|
||||
ui->createSubfolderComboBox->setChecked(Preferences::instance()->getTorrentCreateSubfolder());
|
||||
ui->createSubfolderCheckBox->setChecked(session->isCreateTorrentSubfolder());
|
||||
|
||||
ui->doNotDeleteTorrentCheckBox->setVisible(TorrentFileGuard::autoDeleteMode() != TorrentFileGuard::Never);
|
||||
|
||||
@@ -627,7 +627,7 @@ void AddNewTorrentDialog::accept()
|
||||
BitTorrent::AddTorrentParams params;
|
||||
|
||||
// TODO: Check if destination actually exists
|
||||
params.skipChecking = ui->skip_check_cb->isChecked();
|
||||
params.skipChecking = ui->skipCheckingCheckBox->isChecked();
|
||||
|
||||
// Category
|
||||
params.category = ui->categoryComboBox->currentText();
|
||||
@@ -640,7 +640,7 @@ void AddNewTorrentDialog::accept()
|
||||
params.filePriorities = m_contentModel->model()->getFilePriorities();
|
||||
|
||||
params.addPaused = !ui->startTorrentCheckBox->isChecked();
|
||||
params.createSubfolder = ui->createSubfolderComboBox->isChecked();
|
||||
params.createSubfolder = ui->createSubfolderCheckBox->isChecked();
|
||||
|
||||
QString savePath = ui->savePathComboBox->itemData(ui->savePathComboBox->currentIndex()).toString();
|
||||
if (ui->comboTTM->currentIndex() != 1) { // 0 is Manual mode and 1 is Automatic mode. Handle all non 1 values as manual mode.
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="skip_check_cb">
|
||||
<widget class="QCheckBox" name="skipCheckingCheckBox">
|
||||
<property name="text">
|
||||
<string>Skip hash check</string>
|
||||
</property>
|
||||
@@ -193,7 +193,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="start_torrent_cb">
|
||||
<widget class="QCheckBox" name="startTorrentCheckBox_2">
|
||||
<property name="text">
|
||||
<string>Start torrent</string>
|
||||
</property>
|
||||
@@ -203,7 +203,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="createSubfolderComboBox">
|
||||
<widget class="QCheckBox" name="createSubfolderCheckBox">
|
||||
<property name="text">
|
||||
<string>Create subfolder</string>
|
||||
</property>
|
||||
@@ -305,8 +305,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>308</width>
|
||||
<height>74</height>
|
||||
<width>321</width>
|
||||
<height>69</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@@ -423,7 +423,7 @@
|
||||
<tabstop>never_show_cb</tabstop>
|
||||
<tabstop>adv_button</tabstop>
|
||||
<tabstop>startTorrentCheckBox</tabstop>
|
||||
<tabstop>skip_check_cb</tabstop>
|
||||
<tabstop>skipCheckingCheckBox</tabstop>
|
||||
<tabstop>categoryComboBox</tabstop>
|
||||
<tabstop>defaultCategoryCheckbox</tabstop>
|
||||
<tabstop>scrollArea</tabstop>
|
||||
|
||||
@@ -516,7 +516,7 @@ void OptionsDialog::saveOptions()
|
||||
AddNewTorrentDialog::setEnabled(useAdditionDialog());
|
||||
AddNewTorrentDialog::setTopLevel(m_ui->checkAdditionDialogFront->isChecked());
|
||||
session->setAddTorrentPaused(addTorrentsInPause());
|
||||
pref->setTorrentCreateSubfolder(m_ui->checkCreateSubfolder->isChecked());
|
||||
session->setCreateTorrentSubfolder(m_ui->checkCreateSubfolder->isChecked());
|
||||
ScanFoldersModel::instance()->removeFromFSWatcher(removedScanDirs);
|
||||
ScanFoldersModel::instance()->addToFSWatcher(addedScanDirs);
|
||||
ScanFoldersModel::instance()->makePersistent();
|
||||
@@ -718,7 +718,7 @@ void OptionsDialog::loadOptions()
|
||||
m_ui->checkAdditionDialog->setChecked(AddNewTorrentDialog::isEnabled());
|
||||
m_ui->checkAdditionDialogFront->setChecked(AddNewTorrentDialog::isTopLevel());
|
||||
m_ui->checkStartPaused->setChecked(session->isAddTorrentPaused());
|
||||
m_ui->checkCreateSubfolder->setChecked(pref->getTorrentCreateSubfolder());
|
||||
m_ui->checkCreateSubfolder->setChecked(session->isCreateTorrentSubfolder());
|
||||
const TorrentFileGuard::AutoDeleteMode autoDeleteMode = TorrentFileGuard::autoDeleteMode();
|
||||
m_ui->deleteTorrentBox->setChecked(autoDeleteMode != TorrentFileGuard::Never);
|
||||
m_ui->deleteCancelledTorrentBox->setChecked(autoDeleteMode == TorrentFileGuard::Always);
|
||||
|
||||
Reference in New Issue
Block a user