| 271 | } |
| 272 | |
| 273 | QString BytesToFormat(qint64 bytes) |
| 274 | { |
| 275 | constexpr double KB = 1024.0; |
| 276 | constexpr double MB = KB * 1024; |
| 277 | constexpr double GB = MB * 1024; |
| 278 | |
| 279 | if (bytes >= GB) { |
| 280 | return QString::number(bytes / GB, 'f', 2) + " Gb"; |
| 281 | } else if (bytes >= MB) { |
| 282 | return QString::number(bytes / MB, 'f', 2) + " Mb"; |
| 283 | } else { |
| 284 | return QString::number(bytes / KB, 'f', 2) + " Kb"; |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | QIcon RecolorIcon(QIcon originalIcon, const QString &colorString) |
| 289 | { |
no outgoing calls
no test coverage detected