| 249 | */ |
| 250 | |
| 251 | QString FormatSecToStr(int seconds) |
| 252 | { |
| 253 | QString result = ""; |
| 254 | int hours = seconds / 3600; |
| 255 | int minutes = (seconds % 3600) / 60; |
| 256 | int secs = seconds % 60; |
| 257 | |
| 258 | if (hours > 0) |
| 259 | result += QString::number(hours) + "h "; |
| 260 | if (minutes > 0) |
| 261 | result += QString::number(minutes) + "m "; |
| 262 | if (secs > 0 || result.isEmpty()) |
| 263 | result += QString::number(secs) + "s"; |
| 264 | |
| 265 | return result.trimmed(); |
| 266 | } |
| 267 | |
| 268 | QString TrimmedEnds(QString str) |
| 269 | { |
no test coverage detected