From 18b2a241ffa50e2937e507642ac2037805590165 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Tue, 29 Oct 2024 08:25:17 +0100 Subject: [PATCH] Address PR review. Signed-off-by: Camila Ayres --- src/gui/accountmanager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index 8cb16779c9807..c6102a7d7cad2 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -402,8 +402,9 @@ void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool s settings.setValue(QLatin1String(authTypeC), acc->_credentials->authType()); // HACK: Save http_user also as user - if (acc->_settingsMap.contains(httpUserC) && acc->_settingsMap.value(httpUserC).isValid()) { - settings.setValue(userC, acc->_settingsMap.value(httpUserC)); + const auto settingsMap = acc->_settingsMap; + if (settingsMap.contains(httpUserC) && settingsMap.value(httpUserC).isValid()) { + settings.setValue(userC, settingsMap.value(httpUserC)); } }