Change serial port signal for QT6.

half-duplex
Phil Taylor 2023-01-03 12:02:10 +00:00
rodzic 7bb5e0f9c5
commit 373b670482
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -59,7 +59,11 @@ void commHandler::init()
//qInfo(logSerial()) << "Serial buffer size: " << port->readBufferSize();
connect(port, SIGNAL(readyRead()), this, SLOT(receiveDataIn()));
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
connect(port, SIGNAL(error(QSerialPort::SerialPortError)), this, SLOT(handleError(QSerialPort::SerialPortError)));
#else
connect(port, SIGNAL(errorOccurred(QSerialPort::SerialPortError)), this, SLOT(handleError(QSerialPort::SerialPortError)));
#endif
lastDataReceived = QTime::currentTime();
}