mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 05:38:12 +00:00
feat(src/components/settings/AccountSettingsModel): simplify proxy config
This commit is contained in:
parent
f1892798da
commit
2d2fd4ee34
4 changed files with 8 additions and 13 deletions
|
|
@ -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'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'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue