D14302: Don't block forever in ensureKdeinitRunning
Jaime Torres Amate
noreply at phabricator.kde.org
Mon Jul 23 20:29:17 BST 2018
jtamate added a comment.
In D14302#296469 <https://phabricator.kde.org/D14302#296469>, @jtamate wrote:
> I guess this is a Qt bug.
>
> qint64 QDeadlineTimer::remainingTime() const Q_DECL_NOTHROW
> {
> qint64 ns = remainingTimeNSecs();
> return ns <= 0 ? ns : (ns + 999999) / (1000 * 1000);
> }
>
>
> Shouldn't it be:
>
> return ns <= 0 ? **0** : (ns + 999999) / (1000 * 1000);
>
I answer myself. It is ok. If remainingTimeNSecs() return -1 it also returns -1 (never expire), and in inremainingTimeNSecs() it can only be -1 or 0 or >0
return raw < 0 ? 0 : raw;
But
(gdb) print timer.remainingTime()
$11 = -1
(gdb) print sleepTime
$13 = 6400
Therefore isForever() is returning true. Why?
REPOSITORY
R271 KDBusAddons
REVISION DETAIL
https://phabricator.kde.org/D14302
To: jtamate, dfaure, #frameworks, thiago
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180723/a191a9af/attachment.html>
More information about the Kde-frameworks-devel
mailing list