Skip to content

Toggling "Use SSL" should change default IRC server port

Test case

Steps

  1. Connect to core
  2. Go to overflow menu → Core Settings
  3. Edit an existing network, or add a new one
  4. Add a New Server
  5. Toggle the Use SSL checkbox twice
  6. Change the Port to a non-standard value, e.g. 7000
  7. Toggle the Use SSL checkbox 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

Add network dialog - toggling Use encrypted connection and effects on chosen port

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