Skip to content
Snippets Groups Projects
Commit 8716154b authored by Sébastien Blin's avatar Sébastien Blin
Browse files

profile: minor fixes

+ ModalTextEdit should not change its editMode if isPersistent,
else some editions can be missed.
+ Do not emit profileChanged when the client changes only the
alias, as it's updated by the account's config.

Change-Id: I3381b7494366fcd2d6a8504f0dcf18b622dc1701
parent 9e05e3e1
Branches
Tags
No related merge requests found
......@@ -99,7 +99,7 @@ Loader {
inputIsValid: root.inputIsValid
onFocusChanged: {
if (!focus && root.editMode) {
root.editMode = false
root.editMode = isPersistent
root.accepted()
}
activeChanged(root.editMode)
......
......@@ -270,11 +270,12 @@ AccountModel::setAccountConfig(const QString& accountId,
finalCred.append(credMap);
}
VectorMapStringString oldCredentials = ConfigurationManager::instance().getCredentials(accountId);
if (oldCredentials.empty() || finalCred.empty() ||
oldCredentials[0][ConfProperties::PASSWORD] != finalCred[0][ConfProperties::PASSWORD] ||
oldCredentials[0][ConfProperties::REALM] != finalCred[0][ConfProperties::REALM] ||
oldCredentials[0][ConfProperties::USERNAME] != finalCred[0][ConfProperties::USERNAME])
VectorMapStringString oldCredentials = ConfigurationManager::instance().getCredentials(
accountId);
if (oldCredentials.empty() || finalCred.empty()
|| oldCredentials[0][ConfProperties::PASSWORD] != finalCred[0][ConfProperties::PASSWORD]
|| oldCredentials[0][ConfProperties::REALM] != finalCred[0][ConfProperties::REALM]
|| oldCredentials[0][ConfProperties::USERNAME] != finalCred[0][ConfProperties::USERNAME])
ConfigurationManager::instance().setCredentials(accountId, finalCred);
details[ConfProperties::USERNAME] = confProperties.username;
accountInfo.confProperties.credentials.swap(credentialsVec);
......@@ -297,8 +298,6 @@ AccountModel::setAlias(const QString& accountId, const QString& alias)
accountInfo.profileInfo.alias = alias;
authority::storage::createOrUpdateProfile(accountInfo.id, accountInfo.profileInfo);
Q_EMIT profileUpdated(accountId);
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment