mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 14:55:43 +02:00
accountconfig: avoid duplication between dhtPort and DHT.port
Also show it in advanced settings Change-Id: I8de880657530c4a957846ca334332f7ccf79ef8c
This commit is contained in:
parent
402515365d
commit
08f3339693
7 changed files with 21 additions and 4 deletions
2
daemon
2
daemon
|
@ -1 +1 @@
|
||||||
Subproject commit 842128f09bf0f1259602de70604285e8a2a427f1
|
Subproject commit c9bb7b123194967dda603f0ef3ba00d2b5b4c520
|
|
@ -145,6 +145,7 @@ CurrentAccount::updateData()
|
||||||
set_peerDiscovery(accConfig.peerDiscovery, true);
|
set_peerDiscovery(accConfig.peerDiscovery, true);
|
||||||
set_sendReadReceipt(accConfig.sendReadReceipt, true);
|
set_sendReadReceipt(accConfig.sendReadReceipt, true);
|
||||||
set_isRendezVous(accConfig.isRendezVous, true);
|
set_isRendezVous(accConfig.isRendezVous, true);
|
||||||
|
set_dhtPort(accConfig.dhtPort, true);
|
||||||
set_autoAnswer(accConfig.autoAnswer, true);
|
set_autoAnswer(accConfig.autoAnswer, true);
|
||||||
set_proxyEnabled(accConfig.proxyEnabled, true);
|
set_proxyEnabled(accConfig.proxyEnabled, true);
|
||||||
set_upnpEnabled(accConfig.upnpEnabled, true);
|
set_upnpEnabled(accConfig.upnpEnabled, true);
|
||||||
|
|
|
@ -116,6 +116,7 @@ class CurrentAccount final : public QObject
|
||||||
QML_RO_PROPERTY(lrc::api::profile::Type, type)
|
QML_RO_PROPERTY(lrc::api::profile::Type, type)
|
||||||
|
|
||||||
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, keepAliveEnabled)
|
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, keepAliveEnabled)
|
||||||
|
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(int, dhtPort)
|
||||||
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, peerDiscovery)
|
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, peerDiscovery)
|
||||||
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, sendReadReceipt)
|
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, sendReadReceipt)
|
||||||
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, isRendezVous)
|
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(bool, isRendezVous)
|
||||||
|
|
|
@ -162,6 +162,7 @@ Item {
|
||||||
property string videoRTPMaxPort: qsTr("Video RTP maximum port")
|
property string videoRTPMaxPort: qsTr("Video RTP maximum port")
|
||||||
|
|
||||||
// AdvancedOpenDHTSettings
|
// AdvancedOpenDHTSettings
|
||||||
|
property string dhtPortUsed: qsTr("Current DHT port used")
|
||||||
property string enablePeerDiscovery: qsTr("Enable local peer discovery")
|
property string enablePeerDiscovery: qsTr("Enable local peer discovery")
|
||||||
property string tooltipPeerDiscovery: qsTr("Connect to other DHT nodes advertising on your local network.")
|
property string tooltipPeerDiscovery: qsTr("Connect to other DHT nodes advertising on your local network.")
|
||||||
property string openDHTConfig: qsTr("OpenDHT configuration")
|
property string openDHTConfig: qsTr("OpenDHT configuration")
|
||||||
|
|
|
@ -45,6 +45,20 @@ ColumnLayout {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
SettingSpinBox {
|
||||||
|
id: dhtPortUsed
|
||||||
|
|
||||||
|
visible: !root.isSIP
|
||||||
|
|
||||||
|
title: JamiStrings.dhtPortUsed
|
||||||
|
itemWidth: root.itemWidth
|
||||||
|
bottomValue: 0
|
||||||
|
topValue: 65535
|
||||||
|
|
||||||
|
valueField: CurrentAccount.dhtPort
|
||||||
|
onNewValue: CurrentAccount.dhtPort = valueField
|
||||||
|
}
|
||||||
|
|
||||||
ToggleSwitch {
|
ToggleSwitch {
|
||||||
id: checkAutoConnectOnLocalNetwork
|
id: checkAutoConnectOnLocalNetwork
|
||||||
visible: !root.isSIP
|
visible: !root.isSIP
|
||||||
|
|
|
@ -849,6 +849,7 @@ account::Info::fromDetails(const MapStringString& details)
|
||||||
confProperties.proxyEnabled = toBool(details[ConfProperties::PROXY_ENABLED]);
|
confProperties.proxyEnabled = toBool(details[ConfProperties::PROXY_ENABLED]);
|
||||||
confProperties.proxyServer = details[ConfProperties::PROXY_SERVER];
|
confProperties.proxyServer = details[ConfProperties::PROXY_SERVER];
|
||||||
confProperties.proxyPushToken = details[ConfProperties::PROXY_PUSH_TOKEN];
|
confProperties.proxyPushToken = details[ConfProperties::PROXY_PUSH_TOKEN];
|
||||||
|
confProperties.dhtPort = toInt(details[ConfProperties::DHT_PORT]);
|
||||||
confProperties.peerDiscovery = toBool(details[ConfProperties::DHT_PEER_DISCOVERY]);
|
confProperties.peerDiscovery = toBool(details[ConfProperties::DHT_PEER_DISCOVERY]);
|
||||||
confProperties.accountDiscovery = toBool(details[ConfProperties::ACCOUNT_PEER_DISCOVERY]);
|
confProperties.accountDiscovery = toBool(details[ConfProperties::ACCOUNT_PEER_DISCOVERY]);
|
||||||
confProperties.accountPublish = toBool(details[ConfProperties::ACCOUNT_PUBLISH]);
|
confProperties.accountPublish = toBool(details[ConfProperties::ACCOUNT_PUBLISH]);
|
||||||
|
@ -905,7 +906,6 @@ account::Info::fromDetails(const MapStringString& details)
|
||||||
confProperties.TLS.disableSecureDlgCheck = toBool(
|
confProperties.TLS.disableSecureDlgCheck = toBool(
|
||||||
details[ConfProperties::TLS::DISABLE_SECURE_DLG_CHECK]);
|
details[ConfProperties::TLS::DISABLE_SECURE_DLG_CHECK]);
|
||||||
// DHT
|
// DHT
|
||||||
confProperties.DHT.port = toInt(details[ConfProperties::DHT::PORT]);
|
|
||||||
confProperties.DHT.PublicInCalls = toBool(details[ConfProperties::DHT::PUBLIC_IN_CALLS]);
|
confProperties.DHT.PublicInCalls = toBool(details[ConfProperties::DHT::PUBLIC_IN_CALLS]);
|
||||||
confProperties.DHT.AllowFromTrusted = toBool(details[ConfProperties::DHT::ALLOW_FROM_TRUSTED]);
|
confProperties.DHT.AllowFromTrusted = toBool(details[ConfProperties::DHT::ALLOW_FROM_TRUSTED]);
|
||||||
// RingNS
|
// RingNS
|
||||||
|
@ -960,6 +960,7 @@ account::ConfProperties_t::toDetails() const
|
||||||
details[ConfProperties::PROXY_ENABLED] = toQString(this->proxyEnabled);
|
details[ConfProperties::PROXY_ENABLED] = toQString(this->proxyEnabled);
|
||||||
details[ConfProperties::PROXY_SERVER] = this->proxyServer;
|
details[ConfProperties::PROXY_SERVER] = this->proxyServer;
|
||||||
details[ConfProperties::PROXY_PUSH_TOKEN] = this->proxyPushToken;
|
details[ConfProperties::PROXY_PUSH_TOKEN] = this->proxyPushToken;
|
||||||
|
details[ConfProperties::DHT_PORT] = toQString(this->dhtPort);
|
||||||
details[ConfProperties::DHT_PEER_DISCOVERY] = toQString(this->peerDiscovery);
|
details[ConfProperties::DHT_PEER_DISCOVERY] = toQString(this->peerDiscovery);
|
||||||
details[ConfProperties::ACCOUNT_PEER_DISCOVERY] = toQString(this->accountDiscovery);
|
details[ConfProperties::ACCOUNT_PEER_DISCOVERY] = toQString(this->accountDiscovery);
|
||||||
details[ConfProperties::ACCOUNT_PUBLISH] = toQString(this->accountPublish);
|
details[ConfProperties::ACCOUNT_PUBLISH] = toQString(this->accountPublish);
|
||||||
|
@ -1014,7 +1015,6 @@ account::ConfProperties_t::toDetails() const
|
||||||
details[ConfProperties::TLS::DISABLE_SECURE_DLG_CHECK] = toQString(
|
details[ConfProperties::TLS::DISABLE_SECURE_DLG_CHECK] = toQString(
|
||||||
this->TLS.disableSecureDlgCheck);
|
this->TLS.disableSecureDlgCheck);
|
||||||
// DHT
|
// DHT
|
||||||
details[ConfProperties::DHT::PORT] = toQString(this->DHT.port);
|
|
||||||
details[ConfProperties::DHT::PUBLIC_IN_CALLS] = toQString(this->DHT.PublicInCalls);
|
details[ConfProperties::DHT::PUBLIC_IN_CALLS] = toQString(this->DHT.PublicInCalls);
|
||||||
details[ConfProperties::DHT::ALLOW_FROM_TRUSTED] = toQString(this->DHT.AllowFromTrusted);
|
details[ConfProperties::DHT::ALLOW_FROM_TRUSTED] = toQString(this->DHT.AllowFromTrusted);
|
||||||
// RingNS
|
// RingNS
|
||||||
|
|
|
@ -110,6 +110,7 @@ struct ConfProperties_t
|
||||||
QString proxyServer;
|
QString proxyServer;
|
||||||
QString proxyPushToken;
|
QString proxyPushToken;
|
||||||
bool peerDiscovery;
|
bool peerDiscovery;
|
||||||
|
int dhtPort;
|
||||||
bool accountDiscovery;
|
bool accountDiscovery;
|
||||||
bool accountPublish;
|
bool accountPublish;
|
||||||
int registrationExpire;
|
int registrationExpire;
|
||||||
|
@ -176,7 +177,6 @@ struct ConfProperties_t
|
||||||
} TLS;
|
} TLS;
|
||||||
struct DHT_t
|
struct DHT_t
|
||||||
{
|
{
|
||||||
int port;
|
|
||||||
bool PublicInCalls;
|
bool PublicInCalls;
|
||||||
bool AllowFromTrusted;
|
bool AllowFromTrusted;
|
||||||
} DHT;
|
} DHT;
|
||||||
|
|
Loading…
Add table
Reference in a new issue