mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix browse button for torrent export directory in preferences
This commit is contained in:
parent
13493e1afe
commit
66157da5c2
2 changed files with 15 additions and 0 deletions
|
@ -1386,6 +1386,20 @@ void options_imp::on_browseScanDirButton_clicked() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void options_imp::on_browseExportDirButton_clicked() {
|
||||||
|
QString export_path = misc::expandPath(textExportDir->text());
|
||||||
|
QDir exportDir(export_path);
|
||||||
|
QString dir;
|
||||||
|
if(!export_path.isEmpty() && exportDir.exists()) {
|
||||||
|
dir = QFileDialog::getExistingDirectory(this, tr("Choose export directory"), exportDir.absolutePath());
|
||||||
|
} else {
|
||||||
|
dir = QFileDialog::getExistingDirectory(this, tr("Choose export directory"), QDir::homePath());
|
||||||
|
}
|
||||||
|
if(!dir.isNull()){
|
||||||
|
textExportDir->setText(dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void options_imp::on_browseFilterButton_clicked() {
|
void options_imp::on_browseFilterButton_clicked() {
|
||||||
QString filter_path = misc::expandPath(textFilterPath->text());
|
QString filter_path = misc::expandPath(textFilterPath->text());
|
||||||
QDir filterDir(filter_path);
|
QDir filterDir(filter_path);
|
||||||
|
|
|
@ -160,6 +160,7 @@ protected slots:
|
||||||
void on_buttonBox_rejected();
|
void on_buttonBox_rejected();
|
||||||
void applySettings(QAbstractButton* button);
|
void applySettings(QAbstractButton* button);
|
||||||
void on_browseScanDirButton_clicked();
|
void on_browseScanDirButton_clicked();
|
||||||
|
void on_browseExportDirButton_clicked();
|
||||||
void on_browseFilterButton_clicked();
|
void on_browseFilterButton_clicked();
|
||||||
void on_browseSaveDirButton_clicked();
|
void on_browseSaveDirButton_clicked();
|
||||||
void on_browseTempDirButton_clicked();
|
void on_browseTempDirButton_clicked();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue