diff options
-rw-r--r-- | src/serialport/qserialport.cpp | 17 | ||||
-rw-r--r-- | src/serialport/qserialport_symbian.cpp | 2 | ||||
-rw-r--r-- | src/serialport/qserialport_symbian_p.h | 2 | ||||
-rw-r--r-- | src/serialport/qserialport_unix.cpp | 2 | ||||
-rw-r--r-- | src/serialport/qserialport_unix_p.h | 2 | ||||
-rw-r--r-- | src/serialport/qserialport_win.cpp | 6 | ||||
-rw-r--r-- | src/serialport/qserialport_win_p.h | 2 |
7 files changed, 11 insertions, 22 deletions
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp index b86b382e..2d0d582e 100644 --- a/src/serialport/qserialport.cpp +++ b/src/serialport/qserialport.cpp @@ -1160,7 +1160,7 @@ bool QSerialPort::waitForBytesWritten(int msecs) If the duration is non zero then zero bits are transmitted within a certain period of time depending on the implementation. - \sa setBreak(), clearBreak() + \sa setBreakEnabled() */ bool QSerialPort::sendBreak(int duration) { @@ -1174,12 +1174,12 @@ bool QSerialPort::sendBreak(int duration) If \a set is true then enables the break transmission; otherwise disables. - \sa clearBreak(), sendBreak() + \sa sendBreak() */ bool QSerialPort::setBreakEnabled(bool set) { Q_D(QSerialPort); - return d->setBreak(set); + return d->setBreakEnabled(set); } /*! @@ -1222,17 +1222,6 @@ void QSerialPort::setError(QSerialPort::SerialPortError serialPortError, const Q emit error(serialPortError); } -/*! - \fn bool QSerialPort::clearBreak(bool clear) - - Controls the signal break, depending on the flag \a clear. - If successful, returns true; otherwise returns false. - - If clear is false then enables the break transmission; otherwise disables. - - \sa setBreak(), sendBreak() -*/ - #include "moc_qserialport.cpp" QT_END_NAMESPACE diff --git a/src/serialport/qserialport_symbian.cpp b/src/serialport/qserialport_symbian.cpp index bbe56f35..2bba5a4d 100644 --- a/src/serialport/qserialport_symbian.cpp +++ b/src/serialport/qserialport_symbian.cpp @@ -229,7 +229,7 @@ bool QSerialPortPrivate::sendBreak(int duration) return false; } -bool QSerialPortPrivate::setBreak(bool set) +bool QSerialPortPrivate::setBreakEnabled(bool set) { // TODO: Implement me return false; diff --git a/src/serialport/qserialport_symbian_p.h b/src/serialport/qserialport_symbian_p.h index 36017694..7f9eaddd 100644 --- a/src/serialport/qserialport_symbian_p.h +++ b/src/serialport/qserialport_symbian_p.h @@ -65,7 +65,7 @@ public: bool clear(QSerialPort::Directions dir); bool sendBreak(int duration); - bool setBreak(bool set); + bool setBreakEnabled(bool set); qint64 systemInputQueueSize () const; qint64 systemOutputQueueSize () const; diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp index f16ecccf..2f6c8ccb 100644 --- a/src/serialport/qserialport_unix.cpp +++ b/src/serialport/qserialport_unix.cpp @@ -336,7 +336,7 @@ bool QSerialPortPrivate::sendBreak(int duration) return ::tcsendbreak(descriptor, duration) != -1; } -bool QSerialPortPrivate::setBreak(bool set) +bool QSerialPortPrivate::setBreakEnabled(bool set) { return ::ioctl(descriptor, set ? TIOCSBRK : TIOCCBRK) != -1; } diff --git a/src/serialport/qserialport_unix_p.h b/src/serialport/qserialport_unix_p.h index 98ed7b09..ce70c243 100644 --- a/src/serialport/qserialport_unix_p.h +++ b/src/serialport/qserialport_unix_p.h @@ -72,7 +72,7 @@ public: bool clear(QSerialPort::Directions dir); bool sendBreak(int duration); - bool setBreak(bool set); + bool setBreakEnabled(bool set); qint64 systemInputQueueSize () const; qint64 systemOutputQueueSize () const; diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp index d0625839..bbc3e8cd 100644 --- a/src/serialport/qserialport_win.cpp +++ b/src/serialport/qserialport_win.cpp @@ -376,15 +376,15 @@ bool QSerialPortPrivate::clear(QSerialPort::Directions dir) bool QSerialPortPrivate::sendBreak(int duration) { // FIXME: - if (setBreak(true)) { + if (setBreakEnabled(true)) { ::Sleep(duration); - if (setBreak(false)) + if (setBreakEnabled(false)) return true; } return false; } -bool QSerialPortPrivate::setBreak(bool set) +bool QSerialPortPrivate::setBreakEnabled(bool set) { if (set) return ::SetCommBreak(descriptor); diff --git a/src/serialport/qserialport_win_p.h b/src/serialport/qserialport_win_p.h index d058e52f..a59ea9a7 100644 --- a/src/serialport/qserialport_win_p.h +++ b/src/serialport/qserialport_win_p.h @@ -78,7 +78,7 @@ public: bool clear(QSerialPort::Directions dir); bool sendBreak(int duration); - bool setBreak(bool set); + bool setBreakEnabled(bool set); qint64 systemInputQueueSize () const; qint64 systemOutputQueueSize () const; |