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.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp
index 4f3fd04..02a9422 100644
--- a/src/serialport/qserialport.cpp
+++ b/src/serialport/qserialport.cpp
@@ -109,7 +109,6 @@ QSerialPortPrivate::QSerialPortPrivate()
, startAsyncWriteTimer(0)
, originalEventMask(0)
, triggeredEventMask(0)
- , actualBytesToWrite(0)
#elif defined(Q_OS_UNIX)
, descriptor(-1)
, readNotifier(0)
@@ -515,10 +514,6 @@ void QSerialPort::setPort(const QSerialPortInfo &serialPortInfo)
\li Removes the prefix "\\\\.\\" or "//./" from the system location
and returns the remainder of the string.
\row
- \li Windows CE
- \li Removes the suffix ":" from the system location
- and returns the remainder of the string.
- \row
\li Unix, BSD
\li Removes the prefix "/dev/" from the system location
and returns the remainder of the string.
@@ -568,15 +563,6 @@ bool QSerialPort::open(OpenMode mode)
if (!d->open(mode))
return false;
- if (!d->setBaudRate()
- || !d->setDataBits(d->dataBits)
- || !d->setParity(d->parity)
- || !d->setStopBits(d->stopBits)
- || !d->setFlowControl(d->flowControl)) {
- d->close();
- return false;
- }
-
QIODevice::open(mode);
return true;
}
@@ -659,9 +645,9 @@ bool QSerialPort::settingsRestoredOnClose() const
after that the opening of the port succeeds.
\warning Setting the AllDirections flag is supported on all platforms.
- Windows and Windows CE support only this mode.
+ Windows supports only this mode.
- \warning Returns equal baud rate in any direction on Windows, Windows CE.
+ \warning Returns equal baud rate in any direction on Windows.
The default value is Baud9600, i.e. 9600 bits per second.
*/
@@ -1261,11 +1247,8 @@ qint64 QSerialPort::bytesAvailable() const
*/
qint64 QSerialPort::bytesToWrite() const
{
- qint64 bytes = QIODevice::bytesToWrite();
-#ifdef Q_OS_WIN32
- bytes += d_func()->actualBytesToWrite;
-#endif
- return bytes;
+ Q_D(const QSerialPort);
+ return QIODevice::bytesToWrite() + d->writeBuffer.size();
}
/*!