diff options
author | Sergey Belyashov <Sergey.Belyashov@gmail.com> | 2014-05-13 12:40:47 +0400 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-13 19:01:57 +0200 |
commit | 3d19812f745fac35aab02743c576a51dd9b0714f (patch) | |
tree | 9ab05089f76f82cf035396498287edd035c7ab69 | |
parent | 684945503a444dfc3a0fd475b7f8d81bc48a387a (diff) |
Fix setting custom baud rates under Linuxv5.3.0
This regression was caused by 7c737e0edcb93585856c65890ef34e5c5a28ee6b.
The initialization of the (current) serial port info was removed in that commit.
Tested on Linux x86_64 with Qt 5.1.1 and 4.8.6.
Task-number: QTBUG-38961
Change-Id: Idd3c5dc7eb37093848f33387563ff14567ac54fe
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
-rw-r--r-- | src/serialport/qserialport_unix.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp index 8140e079..dc8d9af7 100644 --- a/src/serialport/qserialport_unix.cpp +++ b/src/serialport/qserialport_unix.cpp @@ -260,6 +260,11 @@ bool QSerialPortPrivate::open(QIODevice::OpenMode mode) if (!updateTermios()) return false; +#ifdef Q_OS_LINUX + isCustomBaudRateSupported = (::ioctl(descriptor, TIOCGSERIAL, ¤tSerialInfo) != -1) + && (::ioctl(descriptor, TIOCSSERIAL, ¤tSerialInfo) != -1); +#endif + setExceptionNotificationEnabled(true); if ((flags & O_WRONLY) == 0) |