aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/server_editor_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/server_editor_dialog.cpp')
-rw-r--r--src/widgets/server_editor_dialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/server_editor_dialog.cpp b/src/widgets/server_editor_dialog.cpp
index 03c8d6c6..8f987f6a 100644
--- a/src/widgets/server_editor_dialog.cpp
+++ b/src/widgets/server_editor_dialog.cpp
@@ -31,6 +31,7 @@ ServerEditorDialog::ServerEditorDialog(QWidget *parent)
FROM_UI(QLineEdit, name);
FROM_UI(QLineEdit, hostname);
FROM_UI(QSpinBox, port);
+ FROM_UI(QCheckBox, secure_cb);
FROM_UI(QPlainTextEdit, description);
FROM_UI(QDialogButtonBox, button_box);
@@ -49,6 +50,7 @@ ServerEditorDialog::ServerEditorDialog(const ServerInfo &server, QWidget *parent
ui_name->setText(server.name);
ui_hostname->setText(server.address);
ui_port->setValue(server.port);
+ ui_secure_cb->setChecked(server.scheme == "wss");
ui_description->setPlainText(server.description);
}
@@ -58,6 +60,7 @@ ServerInfo ServerEditorDialog::currentServerInfo() const
server.name = ui_name->text();
server.address = ui_hostname->text();
server.port = ui_port->value();
+ server.scheme = ui_secure_cb->isChecked() ? "wss" : "ws";
server.description = ui_description->toPlainText();
return server;
}