diff --git src/corelib/kernel/qcore_foundation.mm src/corelib/kernel/qcore_foundation.mm
index 56eabc4b8c80d09d5f34eef49ca83da0c05906a3..1f90be956a96ee097937da61e2f8423a56476064 100644
--- src/corelib/kernel/qcore_foundation.mm
+++ src/corelib/kernel/qcore_foundation.mm
@@ -488,7 +488,7 @@ QTimeZone QTimeZone::fromNSTimeZone(const NSTimeZone *timeZone)
 */
 NSTimeZone *QTimeZone::toNSTimeZone() const
 {
-    return [static_cast<NSTimeZone *>(toCFTimeZone()) autorelease];
+    return [(NSTimeZone *)(toCFTimeZone()) autorelease];
 }
 #endif
 
diff --git src/corelib/io/qfilesystemengine_unix.cpp src/corelib/io/qfilesystemengine_unix.cpp
index 7fed54f..f89b21f 100644
--- src/corelib/io/qfilesystemengine_unix.cpp
+++ src/corelib/io/qfilesystemengine_unix.cpp
@@ -126,11 +126,19 @@ static bool isPackage(const QFileSystemMetaData &data, const QFileSystemEntry &e
 
 #ifdef Q_OS_MACOS
         // Find if an application other than Finder claims to know how to handle the package
-        QCFType<CFURLRef> application = LSCopyDefaultApplicationURLForURL(url,
+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_10, __IPHONE_NA)
+        CFURLRef application = nullptr;
+        if (LSGetApplicationForURL(url, kLSRolesEditor | kLSRolesViewer, NULL, &application) != noErr) {
+            application = nullptr;
+        }
+#else
+        CFURLRef application = LSCopyDefaultApplicationURLForURL(url,
             kLSRolesEditor | kLSRolesViewer, nullptr);
+#endif
 
         if (application) {
             QCFType<CFBundleRef> bundle = CFBundleCreate(kCFAllocatorDefault, application);
+            CFRelease(application);
             CFStringRef identifier = CFBundleGetIdentifier(bundle);
             QString applicationId = QString::fromCFString(identifier);
             if (applicationId != QLatin1String("com.apple.finder"))
