Fix crash in QSPI::availablePorts() on OS X 10.10


CFTypeRef returned by IORegistryEntrySearchCFProperty sometimes may be
of unexpected type (as CFStringRef instead of CFNumberRef). In this case
the CFNumberGetValue() throws the exception.

The simplest fix is to check the type in searchShortIntProperty() before
calling CFNumberGetValue():

CFGetTypeID(result.as<CFNumberRef>()) == CFNumberGetTypeID().

Thanks to Orest Hera.

Task-number: QTBUG-46875
Change-Id: Id86993c008595f9762a08739bf4c5f5662643e92
Reviewed-by: Dyami Caliri <dyami@dragonframe.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
commita7a4fa4b628526a5d9138ed56bb195be71bac118
parente9566e39dcec4a575d2d44f103562e60e760574f
authorDenis Shienkov <denis.shienkov@gmail.com>
committerDenis Shienkov <denis.shienkov@gmail.com>
commit timeMon, 29 Jun 2015 14:17:10 +0000