fixed: text field can not be updated to memory, including site and port
This commit is contained in:
parent
2eb729d712
commit
66a3538d05
2 changed files with 15 additions and 1 deletions
|
|
@ -47,7 +47,11 @@ void CloakLogic::updateProtocolPage(const QJsonObject &ckConfig, DockerContainer
|
||||||
QJsonObject CloakLogic::getProtocolConfigFromPage(QJsonObject oldConfig)
|
QJsonObject CloakLogic::getProtocolConfigFromPage(QJsonObject oldConfig)
|
||||||
{
|
{
|
||||||
oldConfig.insert(config_key::cipher, comboBoxCipherText());
|
oldConfig.insert(config_key::cipher, comboBoxCipherText());
|
||||||
oldConfig.insert(config_key::site, lineEditSiteText());
|
|
||||||
|
QString newSite = lineEditSiteText();
|
||||||
|
newSite.replace("https://", "");
|
||||||
|
oldConfig.insert(config_key::site, newSite);
|
||||||
|
|
||||||
oldConfig.insert(config_key::port, lineEditPortText());
|
oldConfig.insert(config_key::port, lineEditPortText());
|
||||||
|
|
||||||
return oldConfig;
|
return oldConfig;
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,16 @@ PageProtocolBase {
|
||||||
TextFieldType {
|
TextFieldType {
|
||||||
id: lineEdit_proto_cloak_site
|
id: lineEdit_proto_cloak_site
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
focus: true
|
||||||
height: 31
|
height: 31
|
||||||
text: logic.lineEditSiteText
|
text: logic.lineEditSiteText
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
logic.lineEditSiteText = text
|
logic.lineEditSiteText = text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onCursorRectangleChanged: {
|
||||||
|
logic.lineEditSiteText = text
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,12 +101,17 @@ PageProtocolBase {
|
||||||
TextFieldType {
|
TextFieldType {
|
||||||
id: lineEdit_proto_cloak_port
|
id: lineEdit_proto_cloak_port
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
focus: true
|
||||||
height: 31
|
height: 31
|
||||||
text: logic.lineEditPortText
|
text: logic.lineEditPortText
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
logic.lineEditPortText = text
|
logic.lineEditPortText = text
|
||||||
}
|
}
|
||||||
enabled: logic.lineEditPortEnabled
|
enabled: logic.lineEditPortEnabled
|
||||||
|
|
||||||
|
onCursorRectangleChanged: {
|
||||||
|
logic.lineEditPortText = text
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue