From dc4e899a26cbdfdca7a74871537b83b8dc0bb45f Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Sat, 9 Nov 2013 22:50:38 +0400 Subject: Fix the properties counter declaration place The properties counter shall count quantity of the processed properties for the each found device. Tested on Mac OSX 10.9 with Qt5, no regressions found. Change-Id: Ie665c52dfdea5a0f9c358909e903703c41144a60 Reviewed-by: Sergey Belyashov Reviewed-by: Denis Shienkov --- src/serialport/qserialportinfo_mac.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/serialport/qserialportinfo_mac.cpp b/src/serialport/qserialportinfo_mac.cpp index 2a9307c8..af575989 100644 --- a/src/serialport/qserialportinfo_mac.cpp +++ b/src/serialport/qserialportinfo_mac.cpp @@ -64,7 +64,6 @@ QList QSerialPortInfo::availablePorts() QList serialPortInfoList; static const int propertyCount = 6; - int matchingPropertiesCounter = 0; ::CFMutableDictionaryRef matching = ::IOServiceMatching(kIOSerialBSDServiceValue); @@ -94,6 +93,8 @@ QList QSerialPortInfo::availablePorts() ::CFTypeRef vendorIdentifier = 0; ::CFTypeRef productIdentifier = 0; + int matchingPropertiesCounter = 0; + io_registry_entry_t entry = service; // Find MacOSX-specific properties names. -- cgit v1.2.3