Skip to content

Commit

Permalink
Display changed password in MMM, fix #1217
Browse files Browse the repository at this point in the history
  • Loading branch information
deXol committed Mar 27, 2024
1 parent 3778a30 commit 0a2a86f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/CredentialsManagement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,15 @@ void CredentialsManagement::onPasswordUnlocked(const QString & service, const QS
}
if (serviceMatch && login == selectedLogin->name())
{
m_pCredModel->setClearTextPassword(parsedService, login, password);
ui->credDisplayPasswordInput->setText(password);
const auto loginPassword = selectedLogin->password();
QString passwordToUse = password;
if (!loginPassword.isEmpty() && loginPassword != password)
{
// Password was changed in MMM, display the changed password
passwordToUse = loginPassword;
}
m_pCredModel->setClearTextPassword(parsedService, login, passwordToUse);
ui->credDisplayPasswordInput->setText(passwordToUse);
ui->credDisplayPasswordInput->setLocked(false);
}
}
Expand Down

0 comments on commit 0a2a86f

Please sign in to comment.