[SailfishDevel] QML Timer stops running

Oleksii Serdiuk contacts at oleksii.name
Wed Jan 15 17:31:42 UTC 2014


On 15/01/14 13:16, Thomas Tanghus wrote:
> On Wednesday 15 January 2014 12:48 Oleksii Serdiuk wrote:
>> On 15/01/14 11:54, Thomas Tanghus wrote:
>>> On Wednesday 15 January 2014 08:26 Jonni Rainisto wrote:
>>>> dont use libiphb every 5 seconds, that will kill
>>>> batterylife for suspend (store QA will reject apps that eat battery). Its
>>>> more meant to be triggered every 10, 15, 30 etc. minutes. So if you want
>>>> to
>>>> make 25 minute timer that works even while suspended, then you should do
>>>> libiphb to wake up after 25 minutes.
>>>
>>> The reason for the 5-10 second wakeup is that I want to update cover until
>>> screen goes black, and I haven't found a way to detect that, and
>>> applicationActive doesn't do it. Maybe my search-foo looked for the wrong
>>> keywords.
>>
>> Use Cover.status property:
>>
>> https://sailfishos.org/sailfish-silica/qml-sailfishsilica-cover.html#status-> prop
>>
>> Cover.Active - the cover is visible, and the user can interact with it
> 
> So (saying my covers id is 'cover') I could do:
> 
>     property bool visible: cover.active || applicationActive;

Yes, this should work. However, I wouldn't recommend naming a property
`visible` because this will hide `visible` property of core QML Item
component and might lead to weird behavior.

-- 
With best regards,
Olekii Serdiuk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4813 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140115/151349a6/attachment.bin>


More information about the Devel mailing list