mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 18:28:35 +12:00
Qt: fix log message in update manager
This commit is contained in:
parent
532215fb81
commit
7f8d802bd5
1 changed files with 7 additions and 4 deletions
|
@ -223,9 +223,12 @@ bool update_manager::handle_json(bool automatic)
|
||||||
const QDateTime cur_date = hash_found ? QDateTime::fromString(json_data["current_build"]["datetime"].toString(), date_fmt) : QDateTime::currentDateTimeUtc();
|
const QDateTime cur_date = hash_found ? QDateTime::fromString(json_data["current_build"]["datetime"].toString(), date_fmt) : QDateTime::currentDateTimeUtc();
|
||||||
const QDateTime lts_date = QDateTime::fromString(latest["datetime"].toString(), date_fmt);
|
const QDateTime lts_date = QDateTime::fromString(latest["datetime"].toString(), date_fmt);
|
||||||
|
|
||||||
|
const QString cur_str = cur_date.toString(date_fmt);
|
||||||
|
const QString lts_str = lts_date.toString(date_fmt);
|
||||||
|
|
||||||
const qint64 diff_msec = cur_date.msecsTo(lts_date);
|
const qint64 diff_msec = cur_date.msecsTo(lts_date);
|
||||||
|
|
||||||
update_log.notice("Current: %s, latest: %s, difference: %lld ms", cur_date.toString().toStdString(), lts_date.toString().toStdString(), diff_msec);
|
update_log.notice("Current: %s, latest: %s, difference: %lld ms", cur_str.toStdString(), lts_str.toStdString(), diff_msec);
|
||||||
|
|
||||||
Localized localized;
|
Localized localized;
|
||||||
|
|
||||||
|
@ -235,16 +238,16 @@ bool update_manager::handle_json(bool automatic)
|
||||||
{
|
{
|
||||||
message = tr("A new version of RPCS3 is available!\n\nCurrent version: %0 (%1)\nLatest version: %2 (%3)\nYour version is %4 old.\n\nDo you want to update?")
|
message = tr("A new version of RPCS3 is available!\n\nCurrent version: %0 (%1)\nLatest version: %2 (%3)\nYour version is %4 old.\n\nDo you want to update?")
|
||||||
.arg(json_data["current_build"]["version"].toString())
|
.arg(json_data["current_build"]["version"].toString())
|
||||||
.arg(cur_date.toString(date_fmt))
|
.arg(cur_str)
|
||||||
.arg(latest["version"].toString())
|
.arg(latest["version"].toString())
|
||||||
.arg(lts_date.toString(date_fmt))
|
.arg(lts_str)
|
||||||
.arg(localized.GetVerboseTimeByMs(diff_msec));
|
.arg(localized.GetVerboseTimeByMs(diff_msec));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
message = tr("You're currently using a custom or PR build.\n\nLatest version: %0 (%1)\nThe latest version is %2 old.\n\nDo you want to update to the latest official RPCS3 version?")
|
message = tr("You're currently using a custom or PR build.\n\nLatest version: %0 (%1)\nThe latest version is %2 old.\n\nDo you want to update to the latest official RPCS3 version?")
|
||||||
.arg(latest["version"].toString())
|
.arg(latest["version"].toString())
|
||||||
.arg(lts_date.toString(date_fmt))
|
.arg(lts_str)
|
||||||
.arg(localized.GetVerboseTimeByMs(std::abs(diff_msec)));
|
.arg(localized.GetVerboseTimeByMs(std::abs(diff_msec)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue