| 143 | } |
| 144 | |
| 145 | const QString COperateRawStream::Description() |
| 146 | { |
| 147 | QString szDescription; |
| 148 | if(!Name().isEmpty()) |
| 149 | szDescription = tr("Name: ") + Name() + "\n"; |
| 150 | |
| 151 | if(!GetTypeName().isEmpty()) |
| 152 | szDescription += tr("Type: ") + GetTypeName() + "\n"; |
| 153 | |
| 154 | if(!Protocol().isEmpty()) { |
| 155 | szDescription += tr("Protocol: ") + Protocol(); |
| 156 | #ifdef DEBUG |
| 157 | if(!GetPlugin()->DisplayName().isEmpty()) |
| 158 | szDescription += " - " + GetPlugin()->DisplayName(); |
| 159 | #endif |
| 160 | szDescription += "\n"; |
| 161 | } |
| 162 | |
| 163 | szDescription += tr("Raw stream type: ") + CParameterRawStream::GetTypeName(m_Parameter.GetType()) + "\n"; |
| 164 | |
| 165 | if(CParameterRawStream::TYPE::TCP == m_Parameter.GetType()) { |
| 166 | auto &net = m_Parameter.m_Net; |
| 167 | if(!net.GetHost().isEmpty()) |
| 168 | szDescription += tr("Server address: ") + net.GetHost() |
| 169 | + ":" + QString::number(net.GetPort()) + "\n"; |
| 170 | } |
| 171 | |
| 172 | CSecurityLevel sl(GetSecurityLevel()); |
| 173 | if(GetSecurityLevel() != CSecurityLevel::Level::No) { |
| 174 | szDescription += tr("Security level: "); |
| 175 | if(!sl.GetUnicodeIcon().isEmpty()) |
| 176 | szDescription += sl.GetUnicodeIcon() + " "; |
| 177 | szDescription += sl.GetString() + "\n"; |
| 178 | } |
| 179 | |
| 180 | if(!GetPlugin()->Description().isEmpty()) |
| 181 | szDescription += tr("Description: ") + GetPlugin()->Description(); |
| 182 | |
| 183 | return szDescription; |
| 184 | } |
nothing calls this directly
no test coverage detected