Commit fa264952 authored by Don Gagne's avatar Don Gagne

QSerialPort emitting constant errors on Unix environment

This fix was pulled across from current QSerialPort codebase. I looked
into pulling across newer version of full QSerialPort. While doing that
I discovered that the version we are using has already been hacked to
work with us. It was fairly involved to redo those hacks. So decided to
pull individual change across instead since our version is already not
clean. When we switch to Qt5 all this will go away.
parent 0320b530
......@@ -429,7 +429,8 @@ bool QSerialPortPrivate::waitForReadyRead(int msecs)
bool timedOut = false;
if (!waitForReadOrWrite(&readyToRead, &readyToWrite, true, !writeBuffer.isEmpty(),
timeoutValue(msecs, stopWatch.elapsed()), &timedOut)) {
q_ptr->setError(decodeSystemError());
if (!timedOut)
q_ptr->setError(decodeSystemError());
return false;
}
......@@ -460,7 +461,8 @@ bool QSerialPortPrivate::waitForBytesWritten(int msecs)
bool timedOut = false;
if (!waitForReadOrWrite(&readyToRead, &readyToWrite, true, !writeBuffer.isEmpty(),
timeoutValue(msecs, stopWatch.elapsed()), &timedOut)) {
q_ptr->setError(decodeSystemError());
if (!timedOut)
q_ptr->setError(decodeSystemError());
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment