Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.2
-
Tested on iOS
Probably related to all unix versions
-
fd207c06b81b12086bdf80e4fa7b393bf1f424d6
Description
Calling
QWaitCondition::wait(QMutex *mutex, unsigned long time)
with time larger then INT_MAX, results in an immediate return (due to timeout).
The problem
The problem is related to the internal conversion of unsigned long to int, by calling
void qt_abstime_for_timeout(struct timespec *ts, int timeout);
in
int QWaitConditionPrivate::wait_relative(unsigned long time)
in file qwaitcondition_unix.cpp
Possible solution
Change the second argument of
void qt_abstime_for_timeout(struct timespec *ts, int timeout);
from int to unsigned long:
void qt_abstime_for_timeout(struct timespec *ts, unsigned long timeout);
Attachments
For Gerrit Dashboard: QTBUG-64266 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
159944,12 | Port QWaitCondition to QDeadlineTimer | dev | qt/qtbase | Status: MERGED | +2 | 0 |
280862,6 | Port QThread::wait() to QDeadlineTimer | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |