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

fix: using current setting in autoaccept dialog

This should fixes #4777
This commit is contained in:
Jiachen Yang 2017-10-31 18:26:59 +09:00
parent 5eaf0ab133
commit 70b235f271

View File

@ -178,7 +178,7 @@ void FriendWidget::onContextMenuCalled(QContextMenuEvent* event)
QAction* autoAccept = menu.addAction(tr("Auto accept files from this friend",
"context menu entry"));
const ToxPk id = frnd->getPublicKey();
const QString dir = s.getAutoAcceptDir(id);
QString dir = s.getAutoAcceptDir(id);
autoAccept->setCheckable(true);
autoAccept->setChecked(!dir.isEmpty());
menu.addSeparator();
@ -221,7 +221,7 @@ void FriendWidget::onContextMenuCalled(QContextMenuEvent* event)
autoAccept->setChecked(false);
Settings::getInstance().setAutoAcceptDir(id, "");
} else if (autoAccept->isChecked()) {
const QString dir = QFileDialog::getExistingDirectory(
dir = QFileDialog::getExistingDirectory(
Q_NULLPTR, tr("Choose an auto accept directory", "popup title"), dir);
autoAccept->setChecked(true);