| 77 | } |
| 78 | |
| 79 | const QString COperateSSH::Name() |
| 80 | { |
| 81 | QString szName = m_Parameters.GetName(); |
| 82 | |
| 83 | if(szName.isEmpty()) { |
| 84 | auto &sshNet = m_Parameters.m_SSH.m_Net; |
| 85 | if(!sshNet.GetHost().isEmpty()) { |
| 86 | if(m_Parameters.GetPluginParameters() |
| 87 | && (GetParameter()->GetPluginParameters()->GetNameStyles() |
| 88 | & CParameterPlugin::NameStyle::Protocol) |
| 89 | && !Protocol().isEmpty()) |
| 90 | szName = Protocol() + ": "; |
| 91 | szName += sshNet.GetHost() |
| 92 | + ":" + QString::number(sshNet.GetPort()); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | if(szName.isEmpty()) |
| 97 | szName = COperateTerminal::Name(); |
| 98 | |
| 99 | QString szSecurityLevel; |
| 100 | CSecurityLevel sl(GetSecurityLevel()); |
| 101 | if((GetParameter()->GetPluginParameters()->GetNameStyles() |
| 102 | & CParameterPlugin::NameStyle::SecurityLevel) |
| 103 | && !(GetSecurityLevel() & CSecurityLevel::Level::No) |
| 104 | && !sl.GetUnicodeIcon().isEmpty()) |
| 105 | szSecurityLevel = sl.GetUnicodeIcon().left(2); |
| 106 | |
| 107 | return szSecurityLevel + szName; |
| 108 | } |
| 109 | |
| 110 | const QString COperateSSH::Description() |
| 111 | { |
nothing calls this directly
no test coverage detected