Fix connect-time username prompt being unreachable for SSH/RDP

validateProfileForConnect() still hard-failed with a blocking
QMessageBox for a blank SSH/RDP username, running before
requestConnectOptions() ever got a chance to prompt for it inline --
so the connect-time username prompt added for issue #21 was dead code
in practice; users just got told to go edit the profile instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 08:28:41 -06:00
co-authored by Claude Sonnet 5
parent 7559488ceb
commit 0cdf930303
3 changed files with 14 additions and 9 deletions
+4 -8
View File
@@ -1181,14 +1181,10 @@ bool SessionTab::validateProfileForConnect()
return false;
}
if ((m_profile.protocol.compare(QStringLiteral("SSH"), Qt::CaseInsensitive) == 0
|| m_profile.protocol.compare(QStringLiteral("RDP"), Qt::CaseInsensitive) == 0)
&& m_profile.username.trimmed().isEmpty()) {
QMessageBox::warning(this,
QStringLiteral("Connect"),
QStringLiteral("%1 username is required.").arg(m_profile.protocol));
return false;
}
// SSH/RDP no longer hard-require a username here -- a blank one is
// handled by requestConnectOptions() prompting for it inline at connect
// time (see issue #21). Do not re-add a check here without also
// updating that flow.
return true;
}