| 47 | } |
| 48 | |
| 49 | QString formatNetworkSeqErrors(int errors, int packets) |
| 50 | { |
| 51 | if (packets == 0) { |
| 52 | return "0 / 0 packets"; |
| 53 | } |
| 54 | |
| 55 | const double pct = (errors * 100.0) / packets; |
| 56 | return QString("%1 / %2 packets (%3%)") |
| 57 | .arg(errors) |
| 58 | .arg(packets) |
| 59 | .arg(pct, 0, 'f', 2); |
| 60 | } |
| 61 | |
| 62 | namespace { |
| 63 | // Distinct name (not an overload of formatNetworkSeqErrors): an |
no outgoing calls
no test coverage detected