From 70b235f271b2f3d1dfaf036d60bb7e8e63db2908 Mon Sep 17 00:00:00 2001 From: Jiachen Yang Date: Tue, 31 Oct 2017 18:26:59 +0900 Subject: [PATCH] fix: using current setting in autoaccept dialog This should fixes #4777 --- src/widget/friendwidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widget/friendwidget.cpp b/src/widget/friendwidget.cpp index 752c2f816..f7403e739 100644 --- a/src/widget/friendwidget.cpp +++ b/src/widget/friendwidget.cpp @@ -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,8 +221,8 @@ void FriendWidget::onContextMenuCalled(QContextMenuEvent* event) autoAccept->setChecked(false); Settings::getInstance().setAutoAcceptDir(id, ""); } else if (autoAccept->isChecked()) { - const QString dir = QFileDialog::getExistingDirectory( - Q_NULLPTR, tr("Choose an auto accept directory", "popup title"), dir); + dir = QFileDialog::getExistingDirectory( + Q_NULLPTR, tr("Choose an auto accept directory", "popup title"), dir); autoAccept->setChecked(true); qDebug() << "Setting auto accept dir for" << friendId << "to" << dir;