mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
Revert "fix: 修复频繁重启系统后任务栏进入安全模式"
This reverts commit b56b3d3ee21f121df3d76be9797747b117b0f94e. Reason for revert: <和原有需求不符合> Change-Id: Id2f664d902536de4682b3fa5796f994c653b8f8b
This commit is contained in:
parent
a683cab1aa
commit
36055a4720
@ -84,13 +84,14 @@ void record_start(const QString &configPath)
|
||||
const QString ¤tTime = QDateTime::currentDateTime().toString(timeFormat);
|
||||
|
||||
int collapseNum = settings.value("collapse").toInt();
|
||||
/* 第一次崩溃或进入安全模式后的第一次崩溃,将时间重置 */
|
||||
if (collapseNum == 0) {
|
||||
settings.setValue("first_time", currentTime);
|
||||
}
|
||||
QDateTime lastDate = QDateTime::fromString(settings.value("first_time").toString(), timeFormat);
|
||||
|
||||
/* 两次启动时间相差3秒,认为是异常退出,不在崩溃时做处理,防止异常 */
|
||||
if (qAbs(lastDate.secsTo(QDateTime::currentDateTime())) < 3) {
|
||||
/* 将当前崩溃时间与第一次崩溃时间比较,小于9分钟,记录一次崩溃;大于9分钟,覆盖之前的崩溃时间 */
|
||||
if (qAbs(lastDate.secsTo(QDateTime::currentDateTime())) < 9 * 60) {
|
||||
settings.setValue("collapse", collapseNum + 1);
|
||||
switch (collapseNum) {
|
||||
case 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user