Toggling "Use SSL" should change default IRC server port
Test case
Steps
- Connect to core
- Go to overflow menu →
Core Settings - Edit an existing network, or add a new one
- Add a
New Server - Toggle the
Use SSLcheckbox twice - Change the
Portto a non-standard value, e.g.7000 - Toggle the
Use SSLcheckbox twice
Expected
When the default ports of 6667 for non-SSL and 6697 for SSL are used, toggling Use SSL should change the port number.
When a non-default port is used, toggling Use SSL should not change the port number.
Example animated screenshot of behavior on Quassel desktop
Port only modified when it's at the expected default of 6667 for non-SSL, or 6697 for SSL
Actual
Port number doesn't change, requiring someone to know the default SSL port.
Additional
This matches upstream Quassel behavior, as per networksettingspage.cpp.
void NetworkAddDlg::updateSslPort(bool isChecked)
{
// "Use encrypted connection" was toggled, check the state...
if (isChecked && ui.port->value() == Network::PORT_PLAINTEXT) {
// Had been using the plain-text port, use the SSL default
ui.port->setValue(Network::PORT_SSL);
} else if (!isChecked && ui.port->value() == Network::PORT_SSL) {
// Had been using the SSL port, use the plain-text default
ui.port->setValue(Network::PORT_PLAINTEXT);
}
}
Edited by Shane Synan
