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:
parent
ec7d66e96b
commit
9d6e84906e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user