1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix: Fix crash on auto accept click in AboutFriendForm

Fix #4600
This commit is contained in:
Diadlo 2017-08-30 09:55:56 +03:00
parent aae23c4154
commit bd6516eab7
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727

View File

@ -50,7 +50,8 @@ void AboutFriendForm::onAutoAcceptDirClicked()
about->setAutoAcceptDir("");
ui->selectSaveDir->setText(tr("Auto accept for this contact is disabled"));
} else if (ui->autoacceptfile->isChecked()) {
QString dir = QFileDialog::getExistingDirectory(
QString dir = about->getAutoAcceptDir();
dir = QFileDialog::getExistingDirectory(
Q_NULLPTR, tr("Choose an auto accept directory", "popup title"), dir);
if (dir.isEmpty()) {
@ -82,7 +83,8 @@ void AboutFriendForm::onAutoGroupInvite()
void AboutFriendForm::onSelectDirClicked()
{
QString dir = QFileDialog::getExistingDirectory(
QString dir = about->getAutoAcceptDir();
dir = QFileDialog::getExistingDirectory(
Q_NULLPTR, tr("Choose an auto accept directory", "popup title"), dir);
about->setAutoAcceptDir(dir);