Skip to content
Snippets Groups Projects
Commit 1ab09e4a authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

settings: use route set in account config to save SIP account proxy option

Change-Id: I95b0c80968c51e22662a0c0187adfe07fff1584c
parent d6d2ed03
No related branches found
No related tags found
No related merge requests found
......@@ -160,7 +160,7 @@ AccountAdapter::createSIPAccount(const QVariantMap& settings, QString photoBooth
confProps.hostname = settings["hostname"].toString();
confProps.username = settings["username"].toString();
confProps.password = settings["password"].toString();
confProps.proxyServer = settings["proxy"].toString();
confProps.routeset = settings["proxy"].toString();
LRCInstance::accountModel().setAccountConfig(accountId, confProps);
// set up photobooth avatar to SIP avatar
......
......@@ -318,6 +318,12 @@ SettingsAdapter::getAccountConfig_Password()
return getAccountConfig().password;
}
QString
SettingsAdapter::getAccountConfig_RouteSet()
{
return getAccountConfig().routeset;
}
QString
SettingsAdapter::getAccountConfig_ProxyServer()
{
......@@ -595,10 +601,10 @@ SettingsAdapter::setAccountConfig_Password(QString input)
}
void
SettingsAdapter::setAccountConfig_ProxyServer(QString input)
SettingsAdapter::setAccountConfig_RouteSet(QString input)
{
auto confProps = getAccountConfig();
confProps.proxyServer = input;
confProps.routeset = input;
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), confProps);
}
......
......@@ -108,6 +108,7 @@ public:
Q_INVOKABLE QString getAccountConfig_Hostname();
Q_INVOKABLE QString getAccountConfig_Password();
Q_INVOKABLE QString getAccountConfig_RouteSet();
Q_INVOKABLE QString getAccountConfig_ProxyServer();
Q_INVOKABLE bool getAccountConfig_ProxyEnabled();
......@@ -166,7 +167,7 @@ public:
Q_INVOKABLE void setAccountConfig_Username(QString input);
Q_INVOKABLE void setAccountConfig_Hostname(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 setCallsUntrusted(bool state);
......
......@@ -228,6 +228,7 @@ Rectangle {
visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === ""
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: JamiTheme.preferredMarginSize
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.preferredHeight: JamiTheme.preferredFieldHeight
......@@ -274,7 +275,6 @@ Rectangle {
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.topMargin: isSIP ? JamiTheme.preferredMarginSize : 0
Layout.leftMargin: JamiTheme.preferredMarginSize
Layout.rightMargin: JamiTheme.preferredMarginSize
......
......@@ -37,7 +37,7 @@ ColumnLayout {
usernameSIP.setText(SettingsAdapter.getAccountConfig_Username())
hostnameSIP.setText(SettingsAdapter.getAccountConfig_Hostname())
passSIPlineEdit.setText(SettingsAdapter.getAccountConfig_Password())
proxySIP.setText(SettingsAdapter.getAccountConfig_ProxyServer())
proxySIP.setText(SettingsAdapter.getAccountConfig_RouteSet())
}
SettingsMaterialLineEdit {
......@@ -70,7 +70,7 @@ ColumnLayout {
titleField: qsTr("Proxy")
itemWidth: root.itemWidth
onEditFinished: SettingsAdapter.setAccountConfig_ProxyServer(textField)
onEditFinished: SettingsAdapter.setAccountConfig_RouteSet(textField)
}
SettingsMaterialLineEdit {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment