summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-08-05 13:43:48 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-08-05 14:40:35 +0200
commitb97dd9ea7a8e9aeeb63dcf173afa722f37d9a573 (patch)
tree19df2564b40940401bf13d42e8ceebf1f866ebdb /src
parentad2628329e1685dbccd0ac3c5011336cd2c4f786 (diff)
Remove usages of deprecated APIs
- Fixed the build with disabled deprecated APIs. - Made the docs for deprecated APIs to compile conditionally, based on the deprecation version. Task-number: QTBUG-76491 Change-Id: I38fbd84254d3d35b2bc208994c9fd70142450ad8 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/serialport/qserialport.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp
index 77328551..44d6cd14 100644
--- a/src/serialport/qserialport.cpp
+++ b/src/serialport/qserialport.cpp
@@ -102,7 +102,9 @@ void QSerialPortPrivate::setError(const QSerialPortErrorInfo &errorInfo)
error = errorInfo.errorCode;
q->setErrorString(errorInfo.errorString);
emit q->errorOccurred(error);
+#if QT_DEPRECATED_SINCE(5, 8)
emit q->error(error);
+#endif
}
/*!
@@ -347,6 +349,7 @@ void QSerialPortPrivate::setError(const QSerialPortErrorInfo &errorInfo)
QSerialPort::requestToSend
*/
+#if QT_DEPRECATED_SINCE(5, 2)
/*!
\enum QSerialPort::DataErrorPolicy
\obsolete
@@ -362,6 +365,7 @@ void QSerialPortPrivate::setError(const QSerialPortErrorInfo &errorInfo)
\sa QSerialPort::dataErrorPolicy
*/
+#endif
/*!
\enum QSerialPort::SerialPortError
@@ -1162,12 +1166,14 @@ void QSerialPort::clearError()
d->setError(QSerialPortErrorInfo(QSerialPort::NoError));
}
+#if QT_DEPRECATED_SINCE(5, 8)
/*!
\fn void QSerialPort::error(SerialPortError error)
\obsolete
Use errorOccurred() instead.
*/
+#endif
/*!
\fn void QSerialPort::errorOccurred(SerialPortError error)