summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/text/qfontengine_mac.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 327df451aa..72e5175e1b 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -1560,6 +1560,7 @@ QFontEngine::FaceId QFontEngineMac::faceId() const
{
FaceId ret;
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
// CTFontGetPlatformFont
FSRef ref;
if (ATSFontGetFileReference(FMGetATSFontRefFromFont(fontID), &ref) != noErr)
@@ -1567,7 +1568,9 @@ QFontEngine::FaceId QFontEngineMac::faceId() const
ret.filename = QByteArray(128, 0);
ret.index = fontID;
FSRefMakePath(&ref, (UInt8 *)ret.filename.data(), ret.filename.size());
-#else
+}else
+#endif
+{
FSSpec spec;
if (ATSFontGetFileSpecification(FMGetATSFontRefFromFont(fontID), &spec) != noErr)
return ret;
@@ -1577,7 +1580,7 @@ QFontEngine::FaceId QFontEngineMac::faceId() const
ret.filename = QByteArray(128, 0);
ret.index = fontID;
FSRefMakePath(&ref, (UInt8 *)ret.filename.data(), ret.filename.size());
-#endif
+}
return ret;
}