Skip to content
Snippets Groups Projects
Commit a19f260f authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee Committed by Alexandre Lision
Browse files

credential: Synchronize username

Refs #71613
parent e69032b5
No related branches found
No related tags found
No related merge requests found
...@@ -1046,6 +1046,21 @@ void Account::setHostname(const QString& detail) ...@@ -1046,6 +1046,21 @@ void Account::setHostname(const QString& detail)
void Account::setUsername(const QString& detail) void Account::setUsername(const QString& detail)
{ {
d_ptr->setAccountProperty(DRing::Account::ConfProperties::USERNAME, detail); d_ptr->setAccountProperty(DRing::Account::ConfProperties::USERNAME, detail);
switch (protocol()) {
case Account::Protocol::IAX:
case Account::Protocol::RING:
case Account::Protocol::COUNT__:
//nothing to do
break;
case Account::Protocol::SIP:
if (credentialModel()->rowCount())
credentialModel()->setData(credentialModel()->index(0,0),detail,CredentialModel::Role::NAME);
else {
const QModelIndex idx = credentialModel()->addCredentials();
credentialModel()->setData(idx,detail,CredentialModel::Role::NAME);
}
break;
};
} }
///Set the account mailbox, usually a number, but can be anything ///Set the account mailbox, usually a number, but can be anything
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment