Browse Source

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.
QGC4.4
Don Gagne 11 years ago
parent
commit
fa26495293
  1. 2
      libs/serialport/qserialport_unix.cpp

2
libs/serialport/qserialport_unix.cpp

@ -429,6 +429,7 @@ bool QSerialPortPrivate::waitForReadyRead(int msecs) @@ -429,6 +429,7 @@ bool QSerialPortPrivate::waitForReadyRead(int msecs)
bool timedOut = false;
if (!waitForReadOrWrite(&readyToRead, &readyToWrite, true, !writeBuffer.isEmpty(),
timeoutValue(msecs, stopWatch.elapsed()), &timedOut)) {
if (!timedOut)
q_ptr->setError(decodeSystemError());
return false;
}
@ -460,6 +461,7 @@ bool QSerialPortPrivate::waitForBytesWritten(int msecs) @@ -460,6 +461,7 @@ bool QSerialPortPrivate::waitForBytesWritten(int msecs)
bool timedOut = false;
if (!waitForReadOrWrite(&readyToRead, &readyToWrite, true, !writeBuffer.isEmpty(),
timeoutValue(msecs, stopWatch.elapsed()), &timedOut)) {
if (!timedOut)
q_ptr->setError(decodeSystemError());
return false;
}

Loading…
Cancel
Save