| 790 | } |
| 791 | |
| 792 | QString formatDurationStr(int secs) |
| 793 | { |
| 794 | QStringList strList; |
| 795 | int days = secs / 86400; |
| 796 | int hours = (secs % 86400) / 3600; |
| 797 | int mins = (secs % 3600) / 60; |
| 798 | int seconds = secs % 60; |
| 799 | |
| 800 | if (days) |
| 801 | strList.append(QString(QObject::tr("%1 d")).arg(days)); |
| 802 | if (hours) |
| 803 | strList.append(QString(QObject::tr("%1 h")).arg(hours)); |
| 804 | if (mins) |
| 805 | strList.append(QString(QObject::tr("%1 m")).arg(mins)); |
| 806 | if (seconds || (!days && !hours && !mins)) |
| 807 | strList.append(QString(QObject::tr("%1 s")).arg(seconds)); |
| 808 | |
| 809 | return strList.join(" "); |
| 810 | } |
| 811 | |
| 812 | QString formatServicesStr(quint64 mask) |
| 813 | { |
no test coverage detected