Commit bf77c285 authored by Karel Slaný's avatar Karel Slaný

Removed saveAllSettings() from Accounts::updateAccount().

parent 241409d4
......@@ -328,12 +328,14 @@ Component {
}
}
} else {
accounts.updateAccount(accountListModel, sLoginMethod,
accountNameTextField.text.toString(),
userNameTextField.text.toString(),
passwordTextField.text.toString(),
testAccount.checked, rememberPassword.checked,
useLS.checked, certPathLabelId.text.toString())
if (accounts.updateAccount(accountListModel, sLoginMethod,
accountNameTextField.text.toString(),
userNameTextField.text.toString(),
passwordTextField.text.toString(),
testAccount.checked, rememberPassword.checked,
useLS.checked, certPathLabelId.text.toString())) {
settings.saveAllSettings()
}
pageView.pop(StackView.Immediate)
}
}
......
......@@ -172,7 +172,7 @@ bool Accounts::removeAccount(const QVariant &acntModelVariant,
return true;
}
void Accounts::updateAccount(const QVariant &acntModelVariant,
bool Accounts::updateAccount(const QVariant &acntModelVariant,
const QString &loginMetod, const QString &acntName, const QString &userName,
const QString &pwd, bool isTestAccount, bool rememberPwd, bool storeToDisk,
const QString &certPath)
......@@ -184,7 +184,7 @@ void Accounts::updateAccount(const QVariant &acntModelVariant,
if (accountModel == Q_NULLPTR) {
Q_ASSERT(0);
qCritical("%s", "Cannot access account model.");
return;
return false;
}
if (acntName.isEmpty()) {
......@@ -192,11 +192,11 @@ void Accounts::updateAccount(const QVariant &acntModelVariant,
tr("Problem while updating account"),
tr("Account name has not been specified!"),
tr("This field must be filled in."));
return;
return false;
}
if (!AccountListModel::globAccounts.contains(userName)) {
return;
return false;
}
AcntData &acntData(AccountListModel::globAccounts[userName]);
......@@ -253,8 +253,7 @@ void Accounts::updateAccount(const QVariant &acntModelVariant,
/* Delete isds session context */
emit removeIsdsCtx(userName);
/* update account data in settings */
GlobalSettingsQmlWrapper::saveAllSettings();
return true;
}
bool Accounts::createAccount(const QVariant &acntModelVariant,
......
......@@ -91,7 +91,7 @@ public:
* @brief Update account.
*/
Q_INVOKABLE
void updateAccount(const QVariant &acntModelVariant,
bool updateAccount(const QVariant &acntModelVariant,
const QString &loginMetod, const QString &acntName,
const QString &userName, const QString &pwd, bool isTestAccount,
bool rememberPwd, bool storeToDisk, const QString &certPath);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment