summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.2.04
-rw-r--r--src/serialport/qserialport.cpp3
-rw-r--r--src/serialport/qserialport.h14
3 files changed, 19 insertions, 2 deletions
diff --git a/dist/changes-5.2.0 b/dist/changes-5.2.0
index 63373f4..43c32a9 100644
--- a/dist/changes-5.2.0
+++ b/dist/changes-5.2.0
@@ -96,3 +96,7 @@ not used for finding udev again.
- [QTBUG-32563] Motorola IMX support was added when udev and sysfs are not
present.
+
+- [QTBUG-34429] Mark the the data error policy obsolete. End users should stop
+using this feature now. It may be removed later in Qt 6.X, and there is a
+warning now if it is used.
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp
index c11bcbe..7c332cc 100644
--- a/src/serialport/qserialport.cpp
+++ b/src/serialport/qserialport.cpp
@@ -282,6 +282,7 @@ int QSerialPortPrivateData::timeoutValue(int msecs, int elapsed)
/*!
\enum QSerialPort::DataErrorPolicy
+ \obsolete
This enum describes the policies for the received symbols
while parity errors were detected.
@@ -1059,6 +1060,7 @@ bool QSerialPort::atEnd() const
\property QSerialPort::dataErrorPolicy
\brief the error policy how the process receives the character in case of
parity error detection.
+ \obsolete
If the setting is successful, returns true; otherwise returns false. The
default policy set is IgnorePolicy.
@@ -1097,6 +1099,7 @@ QSerialPort::DataErrorPolicy QSerialPort::dataErrorPolicy() const
/*!
\fn void QSerialPort::dataErrorPolicyChanged(DataErrorPolicy policy)
+ \obsolete
This signal is emitted after the error policy how the process receives the
character in case of parity error detection has been changed. The new error
diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h
index e173445..ada19fb 100644
--- a/src/serialport/qserialport.h
+++ b/src/serialport/qserialport.h
@@ -47,6 +47,10 @@
#include <QtSerialPort/qserialportglobal.h>
+#ifndef QT_DEPRECATED_SINCE
+#define QT_DEPRECATED_SINCE(major, minor) 1
+#endif
+
QT_BEGIN_NAMESPACE
class QSerialPortInfo;
@@ -62,7 +66,9 @@ class Q_SERIALPORT_EXPORT QSerialPort : public QIODevice
Q_PROPERTY(Parity parity READ parity WRITE setParity NOTIFY parityChanged)
Q_PROPERTY(StopBits stopBits READ stopBits WRITE setStopBits NOTIFY stopBitsChanged)
Q_PROPERTY(FlowControl flowControl READ flowControl WRITE setFlowControl NOTIFY flowControlChanged)
+#if QT_DEPRECATED_SINCE(5, 2)
Q_PROPERTY(DataErrorPolicy dataErrorPolicy READ dataErrorPolicy WRITE setDataErrorPolicy NOTIFY dataErrorPolicyChanged)
+#endif
Q_PROPERTY(bool dataTerminalReady READ isDataTerminalReady WRITE setDataTerminalReady NOTIFY dataTerminalReadyChanged)
Q_PROPERTY(bool requestToSend READ isRequestToSend WRITE setRequestToSend NOTIFY requestToSendChanged)
Q_PROPERTY(SerialPortError error READ error RESET clearError NOTIFY error)
@@ -145,6 +151,7 @@ public:
};
Q_DECLARE_FLAGS(PinoutSignals, PinoutSignal)
+#if QT_DEPRECATED_SINCE(5, 2)
enum DataErrorPolicy {
SkipPolicy,
PassZeroPolicy,
@@ -152,6 +159,7 @@ public:
StopReceivingPolicy,
UnknownPolicy = -1
};
+#endif
enum SerialPortError {
NoError,
@@ -213,8 +221,10 @@ public:
bool clear(Directions directions = AllDirections);
bool atEnd() const Q_DECL_OVERRIDE;
- bool setDataErrorPolicy(DataErrorPolicy policy = IgnorePolicy);
- DataErrorPolicy dataErrorPolicy() const;
+#if QT_DEPRECATED_SINCE(5, 2)
+ QT_DEPRECATED bool setDataErrorPolicy(DataErrorPolicy policy = IgnorePolicy);
+ QT_DEPRECATED DataErrorPolicy dataErrorPolicy() const;
+#endif
SerialPortError error() const;
void clearError();