summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2011-09-09 09:01:18 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-09-19 12:18:54 (GMT)
commit5d626bb3a510956415a43739211b7d127de0757f (patch)
tree0f6ca17459f6781c333e4b3a844d95fd74a2a6aa /tools
parent21be1f662196b38e29ae7d0bcceeba16ed155b61 (diff)
downloadQt-5d626bb3a510956415a43739211b7d127de0757f.zip
Qt-5d626bb3a510956415a43739211b7d127de0757f.tar.gz
Qt-5d626bb3a510956415a43739211b7d127de0757f.tar.bz2
runonphone: Include USB serial ports on OS X for CODA, too
The actual devices are already detected in serenum_unix.cpp, but when used with CODA, the eligible /dev entries apparently need to be listed here, too. Reviewed-By: Shane Kearns Merge-Request: 1373
Diffstat (limited to 'tools')
-rw-r--r--tools/runonphone/symbianutils/symbiandevicemanager.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/runonphone/symbianutils/symbiandevicemanager.cpp b/tools/runonphone/symbianutils/symbiandevicemanager.cpp
index 23f5348..e8d0b5e 100644
--- a/tools/runonphone/symbianutils/symbiandevicemanager.cpp
+++ b/tools/runonphone/symbianutils/symbiandevicemanager.cpp
@@ -57,6 +57,7 @@
#include <QtCore/QThread>
#include <QtCore/QWaitCondition>
#include <QtCore/QTimer>
+#include <QtCore/QDir>
namespace SymbianUtils {
@@ -622,6 +623,20 @@ SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::blueToothDevices()
}
}
#endif
+#if defined(Q_OS_MAC)
+ QDir dir("/dev");
+ QStringList filters;
+ filters << "cu.usbmodem*";
+ dir.setNameFilters(filters);
+ QStringList entries = dir.entryList(QDir::System, QDir::Name);
+ foreach (const QString &dev, entries) {
+ SymbianDeviceData *device = new SymbianDeviceData;
+ device->type = SerialPortCommunication;
+ device->portName = dir.filePath(dev);
+ device->friendlyName = tr("USB/Serial device (%1)").arg(device->portName);
+ rc.push_back(SymbianDevice(device));
+ }
+#endif
return rc;
}