diff options
Diffstat (limited to 'examples/serialport/creadersync')
-rw-r--r-- | examples/serialport/creadersync/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/serialport/creadersync/main.cpp b/examples/serialport/creadersync/main.cpp index 188d7b8..47f6ee8 100644 --- a/examples/serialport/creadersync/main.cpp +++ b/examples/serialport/creadersync/main.cpp @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) if (serialPort.error() == QSerialPort::ReadError) { standardOutput << QObject::tr("Failed to read from port %1, error: %2").arg(serialPortName).arg(serialPort.errorString()) << endl; return 1; - } else if (serialPort.error() == QSerialPort::TimeoutError) { + } else if (serialPort.error() == QSerialPort::TimeoutError && readData.isEmpty()) { standardOutput << QObject::tr("No data was currently available for reading from port %1").arg(serialPortName) << endl; return 0; } |