mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Fix "Browse" button in program preferences for "Temp path"
This commit is contained in:
parent
d2b1f6176f
commit
15c7099e85
2 changed files with 15 additions and 5 deletions
|
@ -1355,16 +1355,25 @@ void options_imp::on_browseFilterButton_clicked() {
|
||||||
|
|
||||||
// Display dialog to choose save dir
|
// Display dialog to choose save dir
|
||||||
void options_imp::on_browseSaveDirButton_clicked(){
|
void options_imp::on_browseSaveDirButton_clicked(){
|
||||||
#ifdef Q_WS_WIN
|
QString def_path = QDir::homePath();
|
||||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Choose a save directory"), QDir::rootPath());
|
if(!textSavePath->text().isEmpty())
|
||||||
#else
|
def_path = textSavePath->text();
|
||||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Choose a save directory"), QDir::homePath());
|
QString dir = QFileDialog::getExistingDirectory(this, tr("Choose a save directory"), def_path);
|
||||||
#endif
|
|
||||||
if(!dir.isNull()){
|
if(!dir.isNull()){
|
||||||
textSavePath->setText(dir);
|
textSavePath->setText(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void options_imp::on_browseTempDirButton_clicked(){
|
||||||
|
QString def_path = QDir::homePath();
|
||||||
|
if(!textTempPath->text().isEmpty())
|
||||||
|
def_path = textTempPath->text();
|
||||||
|
QString dir = QFileDialog::getExistingDirectory(this, tr("Choose a save directory"), def_path);
|
||||||
|
if(!dir.isNull()){
|
||||||
|
textTempPath->setText(dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Return Filter object to apply to BT session
|
// Return Filter object to apply to BT session
|
||||||
QString options_imp::getFilter() const{
|
QString options_imp::getFilter() const{
|
||||||
return textFilterPath->text();
|
return textFilterPath->text();
|
||||||
|
|
|
@ -162,6 +162,7 @@ protected slots:
|
||||||
void on_browseScanDirButton_clicked();
|
void on_browseScanDirButton_clicked();
|
||||||
void on_browseFilterButton_clicked();
|
void on_browseFilterButton_clicked();
|
||||||
void on_browseSaveDirButton_clicked();
|
void on_browseSaveDirButton_clicked();
|
||||||
|
void on_browseTempDirButton_clicked();
|
||||||
void enableApplyButton();
|
void enableApplyButton();
|
||||||
void enableSystrayOptions();
|
void enableSystrayOptions();
|
||||||
void disableSystrayOptions();
|
void disableSystrayOptions();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue