From c43d57ef196c688d4378582bfb42db1d4ff3389f Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Wed, 20 Nov 2013 18:31:30 +0000 Subject: Do not handle "no data available" as error in the timeout handler Change-Id: I132a668f1eca2d7a1ac353b6e088b7b07d4e2e12 Reviewed-by: Sergey Belyashov Reviewed-by: Denis Shienkov --- examples/serialport/creaderasync/serialportreader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/serialport/creaderasync/serialportreader.cpp b/examples/serialport/creaderasync/serialportreader.cpp index 5dd7412..e238304 100644 --- a/examples/serialport/creaderasync/serialportreader.cpp +++ b/examples/serialport/creaderasync/serialportreader.cpp @@ -72,13 +72,13 @@ void SerialPortReader::handleReadyRead() void SerialPortReader::handleTimeout() { if (m_readData.isEmpty()) { - m_standardOutput << QObject::tr("Either no data was currently available for reading, or an error occurred for port %1, error: %2").arg(m_serialPort->portName()).arg(m_serialPort->errorString()) << endl; - QCoreApplication::exit(1); + m_standardOutput << QObject::tr("No data was currently available for reading from port %1").arg(m_serialPort->portName()) << endl; } else { m_standardOutput << QObject::tr("Data successfully received from port %1").arg(m_serialPort->portName()) << endl; m_standardOutput << m_readData << endl; - QCoreApplication::quit(); } + + QCoreApplication::quit(); } void SerialPortReader::handleError(QSerialPort::SerialPortError serialPortError) -- cgit v1.2.1