Minor fixes to server port feature.

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
Adam Treat 2024-03-09 10:32:35 -05:00
parent fe653d1489
commit 59f99b7f21
2 changed files with 6 additions and 7 deletions

View File

@ -684,7 +684,7 @@ int MySettings::networkPort() const
{ {
QSettings setting; QSettings setting;
setting.sync(); setting.sync();
return setting.value("networkPort", default_serverChat).toInt(); return setting.value("networkPort", default_networkPort).toInt();
} }
void MySettings::setNetworkPort(int c) void MySettings::setNetworkPort(int c)

View File

@ -255,15 +255,14 @@ MySettingsTab {
ToolTip.text: qsTr("WARNING: This enables the gui to act as a local REST web server(OpenAI API compliant) for API requests and will increase your RAM usage as well") ToolTip.text: qsTr("WARNING: This enables the gui to act as a local REST web server(OpenAI API compliant) for API requests and will increase your RAM usage as well")
ToolTip.visible: hovered ToolTip.visible: hovered
} }
Label { MySettingsLabel {
id: serverPortLabel id: serverPortLabel
text: qsTr("Server Port (Requires restart):") text: qsTr("API Server Port (Requires restart):")
color: theme.textColor
font.pixelSize: theme.fontSizeLarge
Layout.row: 9 Layout.row: 9
Layout.column: 0 Layout.column: 0
} }
MyTextField { MyTextField {
id: serverPortField
text: MySettings.networkPort text: MySettings.networkPort
color: theme.textColor color: theme.textColor
font.pixelSize: theme.fontSizeLarge font.pixelSize: theme.fontSizeLarge
@ -284,7 +283,7 @@ MySettingsTab {
} }
} }
Accessible.role: Accessible.EditableText Accessible.role: Accessible.EditableText
Accessible.name: nServerPortLabel.text Accessible.name: serverPortField.text
Accessible.description: ToolTip.text Accessible.description: ToolTip.text
} }
Rectangle { Rectangle {