Skip to content
Snippets Groups Projects
Commit a5d526fc authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee Committed by Guillaume Roguez
Browse files

account: Fix SIP account detection

Refs #70361

(cherry picked from commit a248284c)
parent 477f4f66
No related branches found
No related tags found
No related merge requests found
...@@ -242,7 +242,8 @@ void AccountModelPrivate::slotDaemonAccountChanged(const QString& account, const ...@@ -242,7 +242,8 @@ void AccountModelPrivate::slotDaemonAccountChanged(const QString& account, const
emit q_ptr->dataChanged(q_ptr->index(i,0),q_ptr->index(q_ptr->size()-1)); emit q_ptr->dataChanged(q_ptr->index(i,0),q_ptr->index(q_ptr->size()-1));
emit q_ptr->layoutChanged(); emit q_ptr->layoutChanged();
enabledProtocol(acc->protocol()); if (acc->id() != DRing::Account::ProtocolNames::IP2IP)
enableProtocol(acc->protocol());
} }
} }
...@@ -370,7 +371,8 @@ void AccountModel::update() ...@@ -370,7 +371,8 @@ void AccountModel::update()
connect(a,SIGNAL(presenceEnabledChanged(bool)),d_ptr,SLOT(slotAccountPresenceEnabledChanged(bool))); connect(a,SIGNAL(presenceEnabledChanged(bool)),d_ptr,SLOT(slotAccountPresenceEnabledChanged(bool)));
emit layoutChanged(); emit layoutChanged();
d_ptr->enabledProtocol(a->protocol()); if (a->id() != DRing::Account::ProtocolNames::IP2IP)
d_ptr->enableProtocol(a->protocol());
} }
} }
} //update } //update
...@@ -394,7 +396,8 @@ void AccountModel::updateAccounts() ...@@ -394,7 +396,8 @@ void AccountModel::updateAccounts()
connect(a,SIGNAL(presenceEnabledChanged(bool)),d_ptr,SLOT(slotAccountPresenceEnabledChanged(bool))); connect(a,SIGNAL(presenceEnabledChanged(bool)),d_ptr,SLOT(slotAccountPresenceEnabledChanged(bool)));
emit dataChanged(index(size()-1,0),index(size()-1,0)); emit dataChanged(index(size()-1,0),index(size()-1,0));
d_ptr->enabledProtocol(a->protocol()); if (a->id() != DRing::Account::ProtocolNames::IP2IP)
d_ptr->enableProtocol(a->protocol());
} }
else { else {
acc->performAction(Account::EditAction::RELOAD); acc->performAction(Account::EditAction::RELOAD);
...@@ -471,7 +474,7 @@ void AccountModel::cancel() { ...@@ -471,7 +474,7 @@ void AccountModel::cancel() {
} }
void AccountModelPrivate::enabledProtocol(Account::Protocol proto) void AccountModelPrivate::enableProtocol(Account::Protocol proto)
{ {
const bool cache = m_lSupportedProtocols[proto]; const bool cache = m_lSupportedProtocols[proto];
...@@ -662,7 +665,8 @@ Account* AccountModel::add(const QString& alias, const Account::Protocol proto) ...@@ -662,7 +665,8 @@ Account* AccountModel::add(const QString& alias, const Account::Protocol proto)
d_ptr->m_pSelectionModel->setCurrentIndex(index(d_ptr->m_lAccounts.size()-1,0), QItemSelectionModel::ClearAndSelect); d_ptr->m_pSelectionModel->setCurrentIndex(index(d_ptr->m_lAccounts.size()-1,0), QItemSelectionModel::ClearAndSelect);
} }
d_ptr->enabledProtocol(proto); if (a->id() != DRing::Account::ProtocolNames::IP2IP)
d_ptr->enableProtocol(proto);
return a; return a;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment