summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/runonphone/serenum_unix.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/runonphone/serenum_unix.cpp b/tools/runonphone/serenum_unix.cpp
index dc9e1d6..d0e7665 100644
--- a/tools/runonphone/serenum_unix.cpp
+++ b/tools/runonphone/serenum_unix.cpp
@@ -148,7 +148,8 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
foreach (int i, usableInterfaces) {
#ifdef Q_OS_MAC
eligibleInterfaces << QString("^cu\\.usbmodem.*%1$")
- .arg(QString("%1").arg(descriptor.bInterfaceNumber, 1, 16).toUpper());
+ .arg(QString("%1").arg(i, 1, 16).toUpper());
+ eligibleInterfacesInfo << InterfaceInfo(manufacturerString, productString, device->descriptor.idVendor, device->descriptor.idProduct);
#else
// ### manufacturer and product strings are only readable as root :(
if (!manufacturerString.isEmpty() && !productString.isEmpty()) {
@@ -161,7 +162,11 @@ QList<SerialPortId> enumerateSerialPorts(int loglevel)
}
#endif
}
+#ifndef Q_OS_MAC
+ // On mac, we need a 1-1 mapping between eligibleInterfaces and eligibleInterfacesInfo
+ // in order to find the friendly name for an interface
eligibleInterfacesInfo << InterfaceInfo(manufacturerString, productString, device->descriptor.idVendor, device->descriptor.idProduct);
+#endif
}
}
}