diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2013-03-15 18:51:10 +0400 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-16 18:13:49 +0100 |
commit | 169b901f6af118f9eccacc2d8ab4d6d8c8c0d8d1 (patch) | |
tree | b8f9b7c8b4c94d482fc2586fa2b301465b319ef9 /src/serialport/qserialport_wince.cpp | |
parent | e08753474802607611532590b58816f0eee30b5f (diff) |
Windows: Fix receive policies processing
Policies should be handled only with ParityError occurred
according to the description of the method setDataErrorPolicy().
Change-Id: Ie0dc9347e50d358508def5ba1a84dadbb0ead4be
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Diffstat (limited to 'src/serialport/qserialport_wince.cpp')
-rw-r--r-- | src/serialport/qserialport_wince.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/serialport/qserialport_wince.cpp b/src/serialport/qserialport_wince.cpp index 4e61a8c0..1c5c8909 100644 --- a/src/serialport/qserialport_wince.cpp +++ b/src/serialport/qserialport_wince.cpp @@ -157,7 +157,7 @@ private: QSerialPortPrivate::QSerialPortPrivate(QSerialPort *q) : QSerialPortPrivateData(q) , descriptor(INVALID_HANDLE_VALUE) - , flagErrorFromCommEvent(0) + , parityErrorOccurred(false) , eventNotifier(0) { } @@ -376,8 +376,9 @@ bool QSerialPortPrivate::notifyRead() readBuffer.truncate(readBytes); // Process emulate policy. - if (flagErrorFromCommEvent) { - flagErrorFromCommEvent = false; + if ((policy != QSerialPort::IgnorePolicy) && parityErrorOccurred) { + + parityErrorOccurred = false; switch (policy) { case QSerialPort::SkipPolicy: |