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