mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Rewrote folder scanning code (Now uses a filesystem watcher)
This commit is contained in:
parent
717a4b00e1
commit
14646d0f9e
9 changed files with 42 additions and 109 deletions
|
@ -174,7 +174,6 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
|
|||
connect(checkStartPaused, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
|
||||
connect(checkScanDir, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
|
||||
connect(textScanDir, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(FolderScanSpin, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
// Connection tab
|
||||
connect(spinPortMin, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(spinPortMax, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
|
@ -302,7 +301,6 @@ void options_imp::saveOptions(){
|
|||
settings.setValue(QString::fromUtf8("AdditionDialog"), useAdditionDialog());
|
||||
settings.setValue(QString::fromUtf8("StartInPause"), addTorrentsInPause());
|
||||
settings.setValue(QString::fromUtf8("ScanDir"), getScanDir());
|
||||
settings.setValue(QString::fromUtf8("ScanDirInterval"), getFolderScanInterval());
|
||||
settings.setValue(QString::fromUtf8("DblClOnTorDl"), getActionOnDblClOnTorrentDl());
|
||||
settings.setValue(QString::fromUtf8("DblClOnTorFn"), getActionOnDblClOnTorrentFn());
|
||||
// End Downloads preferences
|
||||
|
@ -513,7 +511,6 @@ void options_imp::loadOptions(){
|
|||
// enable
|
||||
checkScanDir->setChecked(true);
|
||||
textScanDir->setText(strValue);
|
||||
FolderScanSpin->setValue(settings.value(QString::fromUtf8("ScanDirInterval"), 5).toInt());
|
||||
enableDirScan(2);
|
||||
}
|
||||
actionTorrentDlOnDblClBox->setCurrentIndex(settings.value(QString::fromUtf8("DblClOnTorDl"), 0).toInt());
|
||||
|
@ -1112,23 +1109,13 @@ void options_imp::enableDirScan(int checkBoxValue){
|
|||
//enable
|
||||
textScanDir->setEnabled(true);
|
||||
browseScanDirButton->setEnabled(true);
|
||||
FolderScanSpin->setEnabled(true);
|
||||
FolderScanLbl->setEnabled(true);
|
||||
FolderScanLbl2->setEnabled(true);
|
||||
}else{
|
||||
//disable
|
||||
textScanDir->setEnabled(false);
|
||||
browseScanDirButton->setEnabled(false);
|
||||
FolderScanSpin->setEnabled(false);
|
||||
FolderScanLbl->setEnabled(false);
|
||||
FolderScanLbl2->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
int options_imp::getFolderScanInterval() const {
|
||||
return FolderScanSpin->value();
|
||||
}
|
||||
|
||||
bool options_imp::speedInTitleBar() const {
|
||||
return checkSpeedInTitle->isChecked();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue