[The name of the desktop operate]
| 84 | |
| 85 | //! [The name of the desktop operate] |
| 86 | const QString COperateDesktop::Name() |
| 87 | { |
| 88 | QString szName; |
| 89 | // Show the name of parameter |
| 90 | if(GetParameter() && !(GetParameter()->GetName().isEmpty())) |
| 91 | szName += GetParameter()->GetName(); |
| 92 | else { |
| 93 | // Show the prefix of protocol |
| 94 | if(GetParameter() && GetParameter()->GetPluginParameters() |
| 95 | && (GetParameter()->GetPluginParameters()->GetNameStyles() |
| 96 | & CParameterPlugin::NameStyle::Protocol) |
| 97 | && !Protocol().isEmpty()) |
| 98 | szName = Protocol() + ": "; |
| 99 | // Show the server name |
| 100 | szName += ServerName(); |
| 101 | } |
| 102 | |
| 103 | // Show the prefix of security level |
| 104 | QString szSecurityLevel; |
| 105 | CSecurityLevel sl(GetSecurityLevel()); |
| 106 | if((GetParameter()->GetPluginParameters()->GetNameStyles() |
| 107 | & CParameterPlugin::NameStyle::SecurityLevel) |
| 108 | && !(GetSecurityLevel() & CSecurityLevel::Level::No) |
| 109 | && !sl.GetUnicodeIcon().isEmpty()) |
| 110 | szSecurityLevel = sl.GetUnicodeIcon().left(2); |
| 111 | |
| 112 | return szSecurityLevel + szName; |
| 113 | } |
| 114 | //! [The name of the desktop operate] |
| 115 | |
| 116 | //! [The description of the desktop operate] |
nothing calls this directly
no test coverage detected