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)
|
||||
{
|
||||
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());
|
||||
|
||||
return oldConfig;
|
||||
|
|
|
|||
|
|
@ -76,11 +76,16 @@ PageProtocolBase {
|
|||
TextFieldType {
|
||||
id: lineEdit_proto_cloak_site
|
||||
Layout.fillWidth: true
|
||||
focus: true
|
||||
height: 31
|
||||
text: logic.lineEditSiteText
|
||||
onEditingFinished: {
|
||||
logic.lineEditSiteText = text
|
||||
}
|
||||
|
||||
onCursorRectangleChanged: {
|
||||
logic.lineEditSiteText = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -96,12 +101,17 @@ PageProtocolBase {
|
|||
TextFieldType {
|
||||
id: lineEdit_proto_cloak_port
|
||||
Layout.fillWidth: true
|
||||
focus: true
|
||||
height: 31
|
||||
text: logic.lineEditPortText
|
||||
onEditingFinished: {
|
||||
logic.lineEditPortText = text
|
||||
}
|
||||
enabled: logic.lineEditPortEnabled
|
||||
|
||||
onCursorRectangleChanged: {
|
||||
logic.lineEditPortText = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue