diff options
author | Laszlo Papp <lpapp@kde.org> | 2013-12-03 16:41:48 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-04 15:34:54 +0100 |
commit | 97bbe2acd8b4c14315653a3d9dc5757d6518220e (patch) | |
tree | 0ae177d92f779f0c5f224adb0d7793a58ce8a84a /src/serialport/qserialport.h | |
parent | fdd3876111605e84a1f7c31206e20cd99e13f1fb (diff) |
Do not remove obsolete enum values for gcc and clangv5.2.0
Do not try to work around the gcc/clang limitations with external variables
since some people have some concern that it may break the binary compatibility
due to the underlying representation layout.
Talk to upstream (gcc) if a warning for this is desired. It is out of scope for
us. C++14 will help with the [[deprecated]] attribute, but that is light years
ahead.
Task-number: QTBUG-35354
Change-Id: I1c4e0fb950469adceca85147084fa896503de78b
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/serialport/qserialport.h')
-rw-r--r-- | src/serialport/qserialport.h | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h index 92cf79a6..6e164630 100644 --- a/src/serialport/qserialport.h +++ b/src/serialport/qserialport.h @@ -96,20 +96,16 @@ public: Baud19200 = 19200, Baud38400 = 38400, Baud57600 = 57600, - Baud115200 = 115200 -#if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) - , UnknownBaud = -1 -#endif + Baud115200 = 115200, + UnknownBaud = -1 }; enum DataBits { Data5 = 5, Data6 = 6, Data7 = 7, - Data8 = 8 -#if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) - , UnknownDataBits = -1 -#endif + Data8 = 8, + UnknownDataBits = -1 }; enum Parity { @@ -117,38 +113,26 @@ public: EvenParity = 2, OddParity = 3, SpaceParity = 4, - MarkParity = 5 -#if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) - , UnknownParity = -1 -#endif + MarkParity = 5, + UnknownParity = -1 }; enum StopBits { OneStop = 1, OneAndHalfStop = 3, - TwoStop = 2 -#if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) - , UnknownStopBits = -1 -#endif + TwoStop = 2, + UnknownStopBits = -1 }; enum FlowControl { NoFlowControl, HardwareControl, - SoftwareControl -#if !defined(Q_CC_GNU) && !defined(Q_CC_CLANG) - , UnknownFlowControl = -1 -#endif + SoftwareControl, + UnknownFlowControl = -1 }; #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 +#if defined _MSC_VER #pragma deprecated(UnknownBaud) #pragma deprecated(UnknownDataBits) #pragma deprecated(UnknownParity) |