diff options
Diffstat (limited to 'src/serialport/qserialport.h')
-rw-r--r-- | src/serialport/qserialport.h | 55 |
1 files changed, 35 insertions, 20 deletions
diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h index 66e262b..92cf79a 100644 --- a/src/serialport/qserialport.h +++ b/src/serialport/qserialport.h @@ -96,16 +96,20 @@ public: Baud19200 = 19200, Baud38400 = 38400, Baud57600 = 57600, - Baud115200 = 115200, - UnknownBaud = -1 + Baud115200 = 115200 +#if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) + , UnknownBaud = -1 +#endif }; enum DataBits { Data5 = 5, Data6 = 6, Data7 = 7, - Data8 = 8, - UnknownDataBits = -1 + Data8 = 8 +#if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) + , UnknownDataBits = -1 +#endif }; enum Parity { @@ -113,34 +117,46 @@ public: EvenParity = 2, OddParity = 3, SpaceParity = 4, - MarkParity = 5, + MarkParity = 5 #if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) - UnknownParity = -1 + , UnknownParity = -1 #endif }; -#if QT_DEPRECATED_SINCE(5, 2) -#if defined(Q_CC_GNU) || defined(Q_CC_CLANG) - QT_DEPRECATED static const Parity UnknownParity = Parity(-1); -#elif defined _MSC_VER -#pragma deprecated(UnknownParity) -#endif -#endif - enum StopBits { OneStop = 1, OneAndHalfStop = 3, - TwoStop = 2, - UnknownStopBits = -1 + TwoStop = 2 +#if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) + , UnknownStopBits = -1 +#endif }; enum FlowControl { NoFlowControl, HardwareControl, - SoftwareControl, - UnknownFlowControl = -1 + SoftwareControl +#if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) + , UnknownFlowControl = -1 +#endif }; +#if QT_DEPRECATED_SINCE(5, 2) +#if defined(Q_CC_GNU) || defined(Q_CC_CLANG) + QT_DEPRECATED static const BaudRate UnknownBaud = BaudRate(-1); + QT_DEPRECATED static const DataBits UnknownDataBits = DataBits(-1); + QT_DEPRECATED static const Parity UnknownParity = Parity(-1); + QT_DEPRECATED static const StopBits UnknownStopBits = StopBits(-1); + QT_DEPRECATED static const FlowControl UnknownFlowControl = FlowControl(-1); +#elif defined _MSC_VER +#pragma deprecated(UnknownBaud) +#pragma deprecated(UnknownDataBits) +#pragma deprecated(UnknownParity) +#pragma deprecated(UnknownStopBits) +#pragma deprecated(UnknownFlowControl) +#endif +#endif + enum PinoutSignal { NoSignal = 0x00, TransmittedDataSignal = 0x01, @@ -152,8 +168,7 @@ public: RequestToSendSignal = 0x40, ClearToSendSignal = 0x80, SecondaryTransmittedDataSignal = 0x100, - SecondaryReceivedDataSignal = 0x200, - UnknownSignal = -1 + SecondaryReceivedDataSignal = 0x200 }; Q_DECLARE_FLAGS(PinoutSignals, PinoutSignal) |