mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 解决电池显示数值异常问题
解决当电池还剩60秒以内充满时,显示时间却是0的问题 Log: 电池显示问题 Bug: https://pms.uniontech.com/zentao/bug-view-17257.html Change-Id: I9bf6b47cc22945a496916fcd3334b952d0d99c4c Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/2074 Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com> Reviewed-by: <mailman@uniontech.com> Tested-by: <mailman@uniontech.com>
This commit is contained in:
parent
11a934ea04
commit
a91557d053
@ -258,6 +258,9 @@ void PowerPlugin::refreshTipsData()
|
||||
QDateTime time = QDateTime::fromTime_t(timeToEmpty).toUTC();
|
||||
uint hour = time.toString("hh").toUInt();
|
||||
uint min = time.toString("mm").toUInt();
|
||||
uint sencond = time.toString("ss").toInt();
|
||||
if (sencond > 0)
|
||||
min += 1;
|
||||
if (!m_showTimeToFull) {
|
||||
tips = tr("Capacity %1").arg(value);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user