Don't assume CTFontCopyDefaultCascadeListForLanguages is available on 10.8

It's listed in the 10.8 SDK as CT_AVAILABLE_STARTING( __MAC_10_8, __IPHONE_6_0),
but not in the release notes for 10.8:

  http://developer.apple.com/library/mac/#releasenotes/General/APIDiffsMacOSX10_8/CoreText.html

The iPhoneOS 6.0 SDK lists it as CT_AVAILABLE_STARTING( __MAC_NA, __IPHONE_6_0),
which matches the release notes, and some 10.8 systems in the wild apparently
do not have this function declaration in the system headers, so for now we'll
be conservative and not assume it's available.

Change-Id: Idbadda58ea95bfca75458d77cb2799c49fba013a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
bb10
Tor Arne Vestbø 2013-02-13 15:55:53 +01:00 committed by The Qt Project
parent c8a8ca3059
commit 4804f09c66
1 changed files with 2 additions and 3 deletions

View File

@ -361,10 +361,9 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
static QHash<QString, QStringList> fallbackLists;
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 || __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
// CTFontCopyDefaultCascadeListForLanguages is available in the SDK
#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1080) \
|| (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 60000)
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 60000)
// But we have to feature check at runtime
if (&CTFontCopyDefaultCascadeListForLanguages)
#endif