From a1655d6ccf3f82508286b471819cc5e5cb64ff44 Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Thu, 10 Sep 2015 16:25:15 +0300 Subject: Cleanup remainders of code relating to data error policy handling It is impossible to implement all these features on all platforms, and particular drivers may not support them, too. Consequently, the user should handle such errors themselves by applying platform-specific ioctls on the device descriptor and/or parsing the stream's byte-stuffing. This commit also deprecates ParityError, FramingError, and BreakConditionError. Tested on Windows and Linux with the virtual and the USB serial ports. Change-Id: I4ffc2f067787bc304a83326acb2a2421b428f986 Reviewed-by: Sergey Belyashov Reviewed-by: Denis Shienkov --- src/serialport/qserialport_p.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/serialport/qserialport_p.h') diff --git a/src/serialport/qserialport_p.h b/src/serialport/qserialport_p.h index 6ad7c26..d2527e3 100644 --- a/src/serialport/qserialport_p.h +++ b/src/serialport/qserialport_p.h @@ -151,7 +151,6 @@ public: bool setParity(QSerialPort::Parity parity); bool setStopBits(QSerialPort::StopBits stopBits); bool setFlowControl(QSerialPort::FlowControl flowControl); - bool setDataErrorPolicy(QSerialPort::DataErrorPolicy policy); QSerialPortErrorInfo getSystemError(int systemErrorCode = -1) const; @@ -177,7 +176,6 @@ public: QSerialPort::Parity parity; QSerialPort::StopBits stopBits; QSerialPort::FlowControl flowControl; - QSerialPort::DataErrorPolicy policy; bool settingsRestoredOnClose; bool isBreakEnabled; @@ -190,7 +188,6 @@ public: bool waitForReadOrWrite(bool *selectForRead, bool *selectForWrite, bool checkRead, bool checkWrite, int msecs); - void processIoErrors(bool error); bool notifyRead(); bool notifyWrite(); @@ -200,7 +197,6 @@ public: COMMTIMEOUTS currentCommTimeouts; COMMTIMEOUTS restoredCommTimeouts; HANDLE handle; - bool parityErrorOccurred; QThread *eventNotifier; QMutex settingsChangeMutex; @@ -211,7 +207,6 @@ public: bool setDcb(DCB *dcb); bool getDcb(DCB *dcb); bool updateCommTimeouts(); - void handleLineStatusErrors(); OVERLAPPED *waitForNotified(int msecs); bool completeAsyncCommunication(qint64 bytesTransferred); @@ -223,14 +218,12 @@ public: bool _q_startAsyncWrite(); void _q_notified(DWORD numberOfBytes, DWORD errorCode, OVERLAPPED *overlapped); - bool emulateErrorPolicy(); void emitReadyRead(); DCB restoredDcb; COMMTIMEOUTS currentCommTimeouts; COMMTIMEOUTS restoredCommTimeouts; HANDLE handle; - bool parityErrorOccurred; QByteArray readChunkBuffer; bool communicationStarted; bool writeStarted; @@ -268,7 +261,6 @@ public: #ifndef CMSPAR qint64 writePerChar(const char *data, qint64 maxSize); #endif - qint64 readPerChar(char *data, qint64 maxSize); bool readNotification(); bool startAsyncWrite(); -- cgit v1.2.1