1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 12:34:19 +00:00

- Fix folder scanning in program preferences (closes #486712)

This commit is contained in:
Christophe Dumez 2009-11-22 16:35:11 +00:00
parent b460f67cc4
commit 573a18c20f
2 changed files with 3 additions and 5 deletions

View File

@ -575,7 +575,7 @@ void options_imp::loadOptions(){
checkPreallocateAll->setChecked(Preferences::preAllocateAllFiles());
checkAdditionDialog->setChecked(Preferences::useAdditionDialog());
checkStartPaused->setChecked(Preferences::addTorrentsInPause());
strValue = Preferences::getSavePath();
strValue = Preferences::getScanDir();
if(strValue.isEmpty()) {
// Disable
checkScanDir->setChecked(false);
@ -1275,9 +1275,7 @@ void options_imp::setLocale(QString locale){
// Return scan dir set in options
QString options_imp::getScanDir() const {
if(checkScanDir->isChecked()){
QString scanDir = textScanDir->text();
scanDir = scanDir.trimmed();
return scanDir;
return textScanDir->text().trimmed();
}else{
return QString();
}

View File

@ -148,7 +148,7 @@ public:
static bool isDirScanEnabled() {
QSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/Downloads/ScanDir"), QString()).toString().isEmpty();
return !settings.value(QString::fromUtf8("Preferences/Downloads/ScanDir"), QString()).toString().isEmpty();
}
static QString getScanDir() {