Internal
Public Access
Fix mRemoteNG import failing on entries without a username
The previous username relaxation only touched ProfileDialog's own save-time validation. ProfileRepository::isProfileValid() had the identical "username required for SSH/RDP" check independently, called directly by insertProfile()/updateProfile() -- exactly the path mRemoteNG import uses, since it builds Profile objects and inserts them directly rather than going through the dialog. Every imported SSH/RDP entry without a recorded username was rejected outright. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -235,13 +235,6 @@ bool isProfileValid(const Profile& profile, QString* error)
|
||||
}
|
||||
|
||||
const QString protocol = normalizedProtocol(profile.protocol);
|
||||
if ((protocol == QStringLiteral("SSH") || protocol == QStringLiteral("RDP"))
|
||||
&& profile.username.trimmed().isEmpty()) {
|
||||
if (error != nullptr) {
|
||||
*error = QStringLiteral("Username is required for %1 profiles.").arg(protocol);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const QString authMode = normalizedAuthMode(protocol, profile.authMode);
|
||||
if (protocol == QStringLiteral("SSH") && authMode == QStringLiteral("Private Key")
|
||||
|
||||
Reference in New Issue
Block a user