mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Rewrote folder scanning code (Now uses a filesystem watcher)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user