D14302: Don't block forever in ensureKdeinitRunning
Lamarque Souza
noreply at phabricator.kde.org
Tue Jul 24 19:07:09 BST 2018
lvsouza added a comment.
I think I know what is happening. This line
QDeadlineTimer timer(qMax(timeout, -1)); // QDT only takes -1 as "forever"
passes the result of qMax() to QDeadlineTimer's constructor. That constructor receives a quint64. Since qMax() is a template:
inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
it will use the type of the assigned variable (quint64 in this case) as T and casting -1 to INT64_MAX. Changing the line to:
QDeadlineTimer timer(qMax(timeout, qint64(-1)));
should solve the problem. If it does not then this should work:
qint64 maxTimeout = qMax(timeout, -1);
QDeadlineTimer timer(maxTimeout);
REPOSITORY
R271 KDBusAddons
REVISION DETAIL
https://phabricator.kde.org/D14302
To: jtamate, dfaure, #frameworks, thiago
Cc: lvsouza, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180724/0aad31cc/attachment.html>
More information about the Kde-frameworks-devel
mailing list