QTimer的使用

        今天报一个bug,自动关机提示界面已经提示,但是一直不关机,打印log看到关机命令已经下发了,但是就是不关机,这是什么原因呢?

        经过同事的帮助,发现关机命令下发了很多次,并且下发的间隔很短,而我原本的设计想法是提示关机,等待两秒后下发关机命令,想必是这里出问题了,不应该下发很多次。查看log发现,电量查询定时器多次调用batteryTimerTimeOut的showAlertWgt,但一直没有调用showAlertWgt里面的延时关机的定时器,直到log的最后却有很多次调用。

[1970-01-01 08:06:13.503] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:15.505] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:17.505] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:19.504] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:21.506] [batteryTimerTimeOut]: batteryTimerTimeOut index = 0,poweroff flag = 1,vol = 10,index = 0
[1970-01-01 08:06:23.505] [batteryTimerTimeO

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值