summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Andrew <github@lukeandrew.com>2014-03-04 14:40:35 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-08 00:24:48 +0100
commit0e46e8d319d054c7325d00b97ba4d7bd30f97e7c (patch)
tree947f10a9507b5c69ff3493494109212ec8c1ed57
parentbc0a65234440b6a08d862840a48ebae0d3421fbc (diff)
downloadqtserialport-0e46e8d319d054c7325d00b97ba4d7bd30f97e7c.tar.gz
Fixed info update for FTDI devices on Android
Added check for Q_OS_ANDROID. If connected to Android, look for a valid TTY_USB id. Task-number: QTBUG-36296 Change-Id: Ic99b0ddd7afc6621e795e2f6cf2952cae6634fb0 Reviewed-by: Luke Andrew <codereview@lukeandrew.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
-rw-r--r--src/serialport/qserialportinfo_unix.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/serialport/qserialportinfo_unix.cpp b/src/serialport/qserialportinfo_unix.cpp
index 9ef113b..5a77abc 100644
--- a/src/serialport/qserialportinfo_unix.cpp
+++ b/src/serialport/qserialportinfo_unix.cpp
@@ -132,13 +132,15 @@ QList<QSerialPortInfo> availablePortsBySysfs()
continue;
QSerialPortInfo serialPortInfo;
-
if (targetPath.contains(QStringLiteral("pnp"))) {
// TODO: Obtain more information
+#ifndef Q_OS_ANDROID
} else if (targetPath.contains(QStringLiteral("platform"))) {
+#else
+ } else if (targetPath.contains(QStringLiteral("platform")) && !targetPath.contains(QStringLiteral("ttyUSB")) ) {
+#endif
continue;
} else if (targetPath.contains(QStringLiteral("usb"))) {
-
QDir targetDir(targetPath);
targetDir.setFilter(QDir::Files | QDir::Readable);
targetDir.setNameFilters(QStringList(QStringLiteral("uevent")));