summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto@kdab.com>2014-04-18 15:52:25 -0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-28 20:46:21 +0200
commit640a4334b35cc15811a845110c60656831bb2a82 (patch)
tree91c000edfe5b78835a6c5e9312f2077c391e1a72 /src
parent8745f6fbf83d3ec585ca2eefcb3abe2dc9bd6321 (diff)
downloadqtserialport-640a4334b35cc15811a845110c60656831bb2a82.tar.gz
Enable QtSerialPort on QNX
On QNX, the combination (IHFLOW | OHFLOW) is equivalent to the CRTSCTS flag. Only /dev/ser* ports can be enumerated. Tested on SVTronics UEVM5432 Omap5 board with QNX 6.6 Change-Id: I64b149258a525835e63f231b5291fa86637e3d2a Reviewed-by: Laszlo Papp <lpapp@kde.org>
Diffstat (limited to 'src')
-rw-r--r--src/serialport/qserialport_unix.cpp4
-rw-r--r--src/serialport/qserialportinfo_unix.cpp2
-rw-r--r--src/src.pro2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp
index 0f999bb..dd4edb0 100644
--- a/src/serialport/qserialport_unix.cpp
+++ b/src/serialport/qserialport_unix.cpp
@@ -55,6 +55,10 @@
#endif
#endif
+#ifdef Q_OS_QNX
+#define CRTSCTS (IHFLOW | OHFLOW)
+#endif
+
#include <private/qcore_unix_p.h>
#include <QtCore/qelapsedtimer.h>
diff --git a/src/serialport/qserialportinfo_unix.cpp b/src/serialport/qserialportinfo_unix.cpp
index 5ec2c12..3440ad2 100644
--- a/src/serialport/qserialportinfo_unix.cpp
+++ b/src/serialport/qserialportinfo_unix.cpp
@@ -77,6 +77,8 @@ static QStringList filteredDeviceFilePaths()
<< QStringLiteral("ircomm*"); // IrDA serial device.
#elif defined (Q_OS_FREEBSD)
<< QStringLiteral("cu*");
+#elif defined (Q_OS_QNX)
+ << QStringLiteral("ser*");
#else
;
#endif
diff --git a/src/src.pro b/src/src.pro
index 1a7c952..072ffd0 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,3 +1,3 @@
TEMPLATE = subdirs
-!winrt:!qnx:SUBDIRS = serialport
+!winrt:SUBDIRS = serialport