From b97dd9ea7a8e9aeeb63dcf173afa722f37d9a573 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 5 Aug 2019 13:43:48 +0200 Subject: 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 --- src/serialport/qserialport.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/serialport') 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) -- cgit v1.2.3