diff options
Diffstat (limited to 'examples/serialport/creaderasync/serialportreader.cpp')
-rw-r--r-- | examples/serialport/creaderasync/serialportreader.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/serialport/creaderasync/serialportreader.cpp b/examples/serialport/creaderasync/serialportreader.cpp index 815ff8c3..5188c69c 100644 --- a/examples/serialport/creaderasync/serialportreader.cpp +++ b/examples/serialport/creaderasync/serialportreader.cpp @@ -42,9 +42,10 @@ SerialPortReader::SerialPortReader(QSerialPort *serialPort, QObject *parent) , m_serialPort(serialPort) , m_standardOutput(stdout) { - connect(m_serialPort, SIGNAL(readyRead()), SLOT(handleReadyRead())); - connect(m_serialPort, SIGNAL(error(QSerialPort::SerialPortError)), SLOT(handleError(QSerialPort::SerialPortError))); - connect(&m_timer, SIGNAL(timeout()), SLOT(handleTimeout())); + connect(m_serialPort, &QSerialPort::readyRead, this, &SerialPortReader::handleReadyRead); + connect(m_serialPort, static_cast<void (QSerialPort::*)(QSerialPort::SerialPortError)>(&QSerialPort::error), + this, &SerialPortReader::handleError); + connect(&m_timer, &QTimer::timeout, this, &SerialPortReader::handleTimeout); m_timer.start(5000); } |