mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-05 07:15:40 +02:00
settings: use route set in account config to save SIP account proxy option
Change-Id: I95b0c80968c51e22662a0c0187adfe07fff1584c
This commit is contained in:
parent
d6d2ed0358
commit
1ab09e4af9
5 changed files with 14 additions and 7 deletions
|
@ -160,7 +160,7 @@ AccountAdapter::createSIPAccount(const QVariantMap& settings, QString photoBooth
|
||||||
confProps.hostname = settings["hostname"].toString();
|
confProps.hostname = settings["hostname"].toString();
|
||||||
confProps.username = settings["username"].toString();
|
confProps.username = settings["username"].toString();
|
||||||
confProps.password = settings["password"].toString();
|
confProps.password = settings["password"].toString();
|
||||||
confProps.proxyServer = settings["proxy"].toString();
|
confProps.routeset = settings["proxy"].toString();
|
||||||
LRCInstance::accountModel().setAccountConfig(accountId, confProps);
|
LRCInstance::accountModel().setAccountConfig(accountId, confProps);
|
||||||
|
|
||||||
// set up photobooth avatar to SIP avatar
|
// set up photobooth avatar to SIP avatar
|
||||||
|
|
|
@ -318,6 +318,12 @@ SettingsAdapter::getAccountConfig_Password()
|
||||||
return getAccountConfig().password;
|
return getAccountConfig().password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString
|
||||||
|
SettingsAdapter::getAccountConfig_RouteSet()
|
||||||
|
{
|
||||||
|
return getAccountConfig().routeset;
|
||||||
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
SettingsAdapter::getAccountConfig_ProxyServer()
|
SettingsAdapter::getAccountConfig_ProxyServer()
|
||||||
{
|
{
|
||||||
|
@ -595,10 +601,10 @@ SettingsAdapter::setAccountConfig_Password(QString input)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SettingsAdapter::setAccountConfig_ProxyServer(QString input)
|
SettingsAdapter::setAccountConfig_RouteSet(QString input)
|
||||||
{
|
{
|
||||||
auto confProps = getAccountConfig();
|
auto confProps = getAccountConfig();
|
||||||
confProps.proxyServer = input;
|
confProps.routeset = input;
|
||||||
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), confProps);
|
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), confProps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,7 @@ public:
|
||||||
Q_INVOKABLE QString getAccountConfig_Hostname();
|
Q_INVOKABLE QString getAccountConfig_Hostname();
|
||||||
Q_INVOKABLE QString getAccountConfig_Password();
|
Q_INVOKABLE QString getAccountConfig_Password();
|
||||||
|
|
||||||
|
Q_INVOKABLE QString getAccountConfig_RouteSet();
|
||||||
Q_INVOKABLE QString getAccountConfig_ProxyServer();
|
Q_INVOKABLE QString getAccountConfig_ProxyServer();
|
||||||
Q_INVOKABLE bool getAccountConfig_ProxyEnabled();
|
Q_INVOKABLE bool getAccountConfig_ProxyEnabled();
|
||||||
|
|
||||||
|
@ -166,7 +167,7 @@ public:
|
||||||
Q_INVOKABLE void setAccountConfig_Username(QString input);
|
Q_INVOKABLE void setAccountConfig_Username(QString input);
|
||||||
Q_INVOKABLE void setAccountConfig_Hostname(QString input);
|
Q_INVOKABLE void setAccountConfig_Hostname(QString input);
|
||||||
Q_INVOKABLE void setAccountConfig_Password(QString input);
|
Q_INVOKABLE void setAccountConfig_Password(QString input);
|
||||||
Q_INVOKABLE void setAccountConfig_ProxyServer(QString input);
|
Q_INVOKABLE void setAccountConfig_RouteSet(QString input);
|
||||||
|
|
||||||
Q_INVOKABLE void setAutoConnectOnLocalNetwork(bool state);
|
Q_INVOKABLE void setAutoConnectOnLocalNetwork(bool state);
|
||||||
Q_INVOKABLE void setCallsUntrusted(bool state);
|
Q_INVOKABLE void setCallsUntrusted(bool state);
|
||||||
|
|
|
@ -228,6 +228,7 @@ Rectangle {
|
||||||
|
|
||||||
visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === ""
|
visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === ""
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
|
@ -274,7 +275,6 @@ Rectangle {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.topMargin: isSIP ? JamiTheme.preferredMarginSize : 0
|
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ ColumnLayout {
|
||||||
usernameSIP.setText(SettingsAdapter.getAccountConfig_Username())
|
usernameSIP.setText(SettingsAdapter.getAccountConfig_Username())
|
||||||
hostnameSIP.setText(SettingsAdapter.getAccountConfig_Hostname())
|
hostnameSIP.setText(SettingsAdapter.getAccountConfig_Hostname())
|
||||||
passSIPlineEdit.setText(SettingsAdapter.getAccountConfig_Password())
|
passSIPlineEdit.setText(SettingsAdapter.getAccountConfig_Password())
|
||||||
proxySIP.setText(SettingsAdapter.getAccountConfig_ProxyServer())
|
proxySIP.setText(SettingsAdapter.getAccountConfig_RouteSet())
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialLineEdit {
|
||||||
|
@ -70,7 +70,7 @@ ColumnLayout {
|
||||||
|
|
||||||
titleField: qsTr("Proxy")
|
titleField: qsTr("Proxy")
|
||||||
itemWidth: root.itemWidth
|
itemWidth: root.itemWidth
|
||||||
onEditFinished: SettingsAdapter.setAccountConfig_ProxyServer(textField)
|
onEditFinished: SettingsAdapter.setAccountConfig_RouteSet(textField)
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialLineEdit {
|
||||||
|
|
Loading…
Add table
Reference in a new issue