mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 09:43:07 -07:00
- Fix folder scanning in program preferences (closes #486712)
This commit is contained in:
parent
b460f67cc4
commit
573a18c20f
2 changed files with 3 additions and 5 deletions
|
@ -575,7 +575,7 @@ void options_imp::loadOptions(){
|
||||||
checkPreallocateAll->setChecked(Preferences::preAllocateAllFiles());
|
checkPreallocateAll->setChecked(Preferences::preAllocateAllFiles());
|
||||||
checkAdditionDialog->setChecked(Preferences::useAdditionDialog());
|
checkAdditionDialog->setChecked(Preferences::useAdditionDialog());
|
||||||
checkStartPaused->setChecked(Preferences::addTorrentsInPause());
|
checkStartPaused->setChecked(Preferences::addTorrentsInPause());
|
||||||
strValue = Preferences::getSavePath();
|
strValue = Preferences::getScanDir();
|
||||||
if(strValue.isEmpty()) {
|
if(strValue.isEmpty()) {
|
||||||
// Disable
|
// Disable
|
||||||
checkScanDir->setChecked(false);
|
checkScanDir->setChecked(false);
|
||||||
|
@ -1275,9 +1275,7 @@ void options_imp::setLocale(QString locale){
|
||||||
// Return scan dir set in options
|
// Return scan dir set in options
|
||||||
QString options_imp::getScanDir() const {
|
QString options_imp::getScanDir() const {
|
||||||
if(checkScanDir->isChecked()){
|
if(checkScanDir->isChecked()){
|
||||||
QString scanDir = textScanDir->text();
|
return textScanDir->text().trimmed();
|
||||||
scanDir = scanDir.trimmed();
|
|
||||||
return scanDir;
|
|
||||||
}else{
|
}else{
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ public:
|
||||||
|
|
||||||
static bool isDirScanEnabled() {
|
static bool isDirScanEnabled() {
|
||||||
QSettings settings("qBittorrent", "qBittorrent");
|
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() {
|
static QString getScanDir() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue