Commit 2d2fd4ee authored by Ronan Abhamon's avatar Ronan Abhamon

feat(src/components/settings/AccountSettingsModel): simplify proxy config

parent f1892798
......@@ -874,10 +874,6 @@ Server url not configured.</translation>
<source></source>
<translation></translation>
</message>
<message>
<source>registerHeader</source>
<translation>Register</translation>
</message>
<message>
<source>eraseAllPasswords</source>
<translation>ERASE PASSWORDS</translation>
......
......@@ -874,10 +874,6 @@ Url du serveur non configurée.</translation>
<source></source>
<translation></translation>
</message>
<message>
<source>registerHeader</source>
<translation>S&apos;enregistrer</translation>
</message>
<message>
<source>eraseAllPasswords</source>
<translation>EFFACER MOTS DE PASSE</translation>
......
......@@ -60,6 +60,8 @@ AccountSettingsModel::AccountSettingsModel (QObject *parent) : QObject(parent) {
// -----------------------------------------------------------------------------
bool AccountSettingsModel::addOrUpdateProxyConfig (const shared_ptr<linphone::ProxyConfig> &proxy_config) {
Q_ASSERT(proxy_config != nullptr);
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
list<shared_ptr<linphone::ProxyConfig> > proxy_configs = core->getProxyConfigList();
......@@ -107,11 +109,15 @@ QVariantMap AccountSettingsModel::getProxyConfigDescription (const shared_ptr<li
}
void AccountSettingsModel::setDefaultProxyConfig (const shared_ptr<linphone::ProxyConfig> &proxy_config) {
Q_ASSERT(proxy_config != nullptr);
CoreManager::getInstance()->getCore()->setDefaultProxyConfig(proxy_config);
emit accountSettingsUpdated();
}
void AccountSettingsModel::removeProxyConfig (const shared_ptr<linphone::ProxyConfig> &proxy_config) {
Q_ASSERT(proxy_config != nullptr);
CoreManager::getInstance()->getCore()->removeProxyConfig(proxy_config);
emit accountSettingsUpdated();
}
......@@ -120,6 +126,8 @@ bool AccountSettingsModel::addOrUpdateProxyConfig (
const shared_ptr<linphone::ProxyConfig> &proxy_config,
const QVariantMap &data
) {
Q_ASSERT(proxy_config != nullptr);
QString literal = data["sipAddress"].toString();
// Sip address.
......
......@@ -71,7 +71,6 @@ TabContainer {
legendLineWidth: SettingsWindowStyle.sipAccounts.legendLineWidth
titles: [
qsTr('registerHeader'),
qsTr('editionHeader'),
qsTr('deleteHeader')
]
......@@ -82,10 +81,6 @@ TabContainer {
delegate: FormTableLine {
title: modelData.sipAddress
FormTableEntry {
Switch {}
}
FormTableEntry {
ActionButton {
icon: 'edit'
......
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