Refactored ConnectDialog::getDataAndClose()