From 74388791bf3aada1c9b0b3a8336738e4be5d643c Mon Sep 17 00:00:00 2001 From: Ludovic LANGE Date: Tue, 27 Sep 2022 21:10:37 +0200 Subject: [PATCH] remove `QSerialPort` obsolete enum values (qt6) Three enums (`QSerialPort::ParityError`, `QSerialPort::FramingError`, `QSerialPort::BreakConditionError`) are [deprecated since Qt5.6](https://doc.qt.io/qt-5/qserialport.html) and removed from Qt6. We remove them, it's unfortunate but I don't know how to replace these - it seems that we need to handle those in an [OS-specific way](https://codereview.qt-project.org/c/qt/qtserialport/+/125517/). --- connections/gvretserial.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connections/gvretserial.cpp b/connections/gvretserial.cpp index c307b44..d6a122c 100644 --- a/connections/gvretserial.cpp +++ b/connections/gvretserial.cpp @@ -485,6 +485,7 @@ void GVRetSerial::serialError(QSerialPort::SerialPortError err) killConnection = true; piStop(); break; +#if QT_VERSION <= QT_VERSION_CHECK( 6, 0, 0 ) case QSerialPort::ParityError: errMessage = "Parity error on serial port"; break; @@ -494,6 +495,7 @@ void GVRetSerial::serialError(QSerialPort::SerialPortError err) case QSerialPort::BreakConditionError: errMessage = "Break error on serial port"; break; +#endif case QSerialPort::WriteError: errMessage = "Write error on serial port"; piStop();