| 131 | } |
| 132 | |
| 133 | const QString COperateSerialPort::Description() |
| 134 | { |
| 135 | QString szDescription; |
| 136 | if(!Name().isEmpty()) |
| 137 | szDescription = tr("Name: ") + Name() + "\n"; |
| 138 | |
| 139 | if(!GetTypeName().isEmpty()) |
| 140 | szDescription += tr("Type: ") + GetTypeName() + "\n"; |
| 141 | |
| 142 | if(!Protocol().isEmpty()) { |
| 143 | szDescription += tr("Protocol: ") + Protocol(); |
| 144 | #ifdef DEBUG |
| 145 | if(!GetPlugin()->DisplayName().isEmpty()) |
| 146 | szDescription += " - " + GetPlugin()->DisplayName(); |
| 147 | #endif |
| 148 | szDescription += "\n"; |
| 149 | } |
| 150 | |
| 151 | if(!m_Parameter.GetSerialPortName().isEmpty()) |
| 152 | szDescription += tr("Serial port: ") + m_Parameter.GetSerialPortName() + "\n"; |
| 153 | |
| 154 | CSecurityLevel sl(GetSecurityLevel()); |
| 155 | if(GetSecurityLevel() != CSecurityLevel::Level::No) { |
| 156 | szDescription += tr("Security level: "); |
| 157 | if(!sl.GetUnicodeIcon().isEmpty()) |
| 158 | szDescription += sl.GetUnicodeIcon() + " "; |
| 159 | szDescription += sl.GetString() + "\n"; |
| 160 | } |
| 161 | |
| 162 | if(!GetPlugin()->Description().isEmpty()) |
| 163 | szDescription += tr("Description: ") + GetPlugin()->Description(); |
| 164 | |
| 165 | return szDescription; |
| 166 | } |
nothing calls this directly
no test coverage detected