MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / Name

Method Name

Plugins/SSH/OperateSSH.cpp:79–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79const 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
110const QString COperateSSH::Description()
111{

Callers

nothing calls this directly

Calls 8

ProtocolEnum · 0.85
GetHostMethod · 0.80
GetPluginParametersMethod · 0.80
GetNameStylesMethod · 0.80
GetUnicodeIconMethod · 0.80
GetNameMethod · 0.45
isEmptyMethod · 0.45
GetPortMethod · 0.45

Tested by

no test coverage detected