1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(Qt): use 'asprintf' instead of 'sprintf'

Deprecated since Qt 5.14.

- https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=f8f592d5
This commit is contained in:
Jimi Huotari 2019-08-23 14:46:09 +03:00 committed by Anthony Bilinski
parent 7f74d41586
commit f9488bf966
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -88,18 +88,18 @@ QString secondsToDHMS(quint32 duration)
// I assume no one will ever have call longer than a month
if (days) {
return cD + res.sprintf("%dd%02dh %02dm %02ds", days, hours, minutes, seconds);
return cD + res.asprintf("%dd%02dh %02dm %02ds", days, hours, minutes, seconds);
}
if (hours) {
return cD + res.sprintf("%02dh %02dm %02ds", hours, minutes, seconds);
return cD + res.asprintf("%02dh %02dm %02ds", hours, minutes, seconds);
}
if (minutes) {
return cD + res.sprintf("%02dm %02ds", minutes, seconds);
return cD + res.asprintf("%02dm %02ds", minutes, seconds);
}
return cD + res.sprintf("%02ds", seconds);
return cD + res.asprintf("%02ds", seconds);
}
} // namespace