mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
Add default transport setting for assistant (assistant_default_transport).
This commit is contained in:
parent
96c150acde
commit
9c99728d84
3 changed files with 19 additions and 1 deletions
|
|
@ -248,6 +248,17 @@ void SettingsModel::setAssistantSupportsPhoneNumbers (bool status) {
|
|||
}
|
||||
}
|
||||
|
||||
int SettingsModel::getAssistantDefaultTransport() const {
|
||||
return mConfig->getInt(UiSection, getEntryFullName(UiSection, "assistant_default_transport") , 2);
|
||||
}
|
||||
|
||||
void SettingsModel::setAssistantDefaultTransport(int transport) {
|
||||
if(!isReadOnly(UiSection, "assistant_default_transport")) {
|
||||
mConfig->setInt(UiSection, "assistant_default_transport", transport);
|
||||
emit assistantSupportsPhoneNumbersChanged(transport);
|
||||
}
|
||||
}
|
||||
|
||||
bool SettingsModel::useWebview() const{
|
||||
#ifdef ENABLE_APP_WEBVIEW
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ class SettingsModel : public QObject {
|
|||
Q_PROPERTY(bool autoApplyProvisioningConfigUriHandlerEnabled READ getAutoApplyProvisioningConfigUriHandlerEnabled WRITE setAutoApplyProvisioningConfigUriHandlerEnabled NOTIFY autoApplyProvisioningConfigUriHandlerEnabledChanged)
|
||||
|
||||
Q_PROPERTY(bool assistantSupportsPhoneNumbers READ getAssistantSupportsPhoneNumbers WRITE setAssistantSupportsPhoneNumbers NOTIFY assistantSupportsPhoneNumbersChanged)
|
||||
Q_PROPERTY(int assistantDefaultTransport READ getAssistantDefaultTransport WRITE setAssistantDefaultTransport NOTIFY assistantDefaultTransportChanged)
|
||||
|
||||
// Webviews config
|
||||
Q_PROPERTY(QString assistantRegistrationUrl READ getAssistantRegistrationUrl WRITE setAssistantRegistrationUrl NOTIFY assistantRegistrationUrlChanged)
|
||||
Q_PROPERTY(QString assistantLoginUrl READ getAssistantLoginUrl WRITE setAssistantLoginUrl NOTIFY assistantLoginUrlChanged)
|
||||
|
|
@ -307,6 +309,9 @@ public:
|
|||
bool getAssistantSupportsPhoneNumbers () const;
|
||||
void setAssistantSupportsPhoneNumbers (bool status);
|
||||
|
||||
int getAssistantDefaultTransport() const;
|
||||
void setAssistantDefaultTransport(int transport);// 0:UDP, 1:TCP, 2:TLS
|
||||
|
||||
Q_INVOKABLE bool useWebview() const;
|
||||
|
||||
QString getAssistantRegistrationUrl () const;
|
||||
|
|
@ -740,6 +745,7 @@ signals:
|
|||
void autoApplyProvisioningConfigUriHandlerEnabledChanged();
|
||||
|
||||
void assistantSupportsPhoneNumbersChanged (bool status);
|
||||
void assistantDefaultTransportChanged (int transport);
|
||||
|
||||
void assistantRegistrationUrlChanged (QString url);
|
||||
void assistantLoginUrlChanged (QString url);
|
||||
|
|
|
|||
|
|
@ -165,7 +165,8 @@ import Common.Styles 1.0
|
|||
ComboBox {
|
||||
id: transport
|
||||
model: [ 'UDP', 'TCP', 'TLS']
|
||||
currentIndex: 2
|
||||
currentIndex: SettingsModel.assistantDefaultTransport
|
||||
onCurrentIndexChanged: console.log(currentIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue