summaryrefslogtreecommitdiff
path: root/src/serialport/qserialport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialport/qserialport.cpp')
-rw-r--r--src/serialport/qserialport.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp
index 9ed1c5f..956c899 100644
--- a/src/serialport/qserialport.cpp
+++ b/src/serialport/qserialport.cpp
@@ -1370,8 +1370,6 @@ bool QSerialPort::isBreakEnabled() const
// method will be called.
qint64 QSerialPort::readData(char *data, qint64 maxSize)
{
- Q_D(QSerialPort);
-
Q_UNUSED(data);
Q_UNUSED(maxSize);
@@ -1380,6 +1378,7 @@ qint64 QSerialPort::readData(char *data, qint64 maxSize)
// in case we have a limited read buffer size. Because the read notification can
// be stalled since Windows do not re-triggered an EV_RXCHAR event if a driver's
// buffer has a remainder of data ready to read until a new data will be received.
+ Q_D(QSerialPort);
if (d->readBufferMaxSize || d->flowControl == QSerialPort::HardwareControl)
d->startAsyncRead();
#endif