diff options
-rw-r--r-- | src/serialport/qserialportinfo_mac.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/serialport/qserialportinfo_mac.cpp b/src/serialport/qserialportinfo_mac.cpp index 1a751df..2a9307c 100644 --- a/src/serialport/qserialportinfo_mac.cpp +++ b/src/serialport/qserialportinfo_mac.cpp @@ -59,12 +59,11 @@ QT_BEGIN_NAMESPACE -enum { MATCHING_PROPERTIES_COUNT = 6 }; - QList<QSerialPortInfo> QSerialPortInfo::availablePorts() { QList<QSerialPortInfo> serialPortInfoList; + static const int propertyCount = 6; int matchingPropertiesCounter = 0; @@ -185,7 +184,7 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts() } // If all matching properties is found, then force break loop. - if (matchingPropertiesCounter == MATCHING_PROPERTIES_COUNT) + if (matchingPropertiesCounter == propertyCount) break; kr = ::IORegistryEntryGetParentEntry(entry, kIOServicePlane, &entry); |