From 95ea1b1aa8d71889bce87c76bb1a996c0f2b58f4 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 22 Apr 2016 17:22:53 -0700 Subject: Remove all code paths related to unsupported Apple platforms. Now that the minimum deployment target (and thus SDK) is 10.9 for OS X and 7.0 for iOS, all code paths affecting platform versions lower than the aforementioned are removed. Change-Id: Id985c7259c4ac069319d88f2c29c9559ae9e8641 Reviewed-by: Jake Petroules --- src/corelib/io/qfilesystemwatcher_fsevents.mm | 8 +------- src/corelib/io/qsettings_mac.cpp | 26 +------------------------- 2 files changed, 2 insertions(+), 32 deletions(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm index be9eef889a..beb8acb05f 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents.mm +++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm @@ -198,7 +198,7 @@ void QFseventsFileSystemWatcherEngine::processEvent(ConstFSEventStreamRef stream const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]) { -#if defined(Q_OS_OSX) && MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_6 +#if defined(Q_OS_OSX) Q_UNUSED(streamRef); bool needsRestart = false; @@ -256,12 +256,6 @@ void QFseventsFileSystemWatcherEngine::processEvent(ConstFSEventStreamRef stream if (needsRestart) emit scheduleStreamRestart(); #else - // This is a work-around for moc: when we put the version check at the top of the header file, - // moc will still see the Q_OBJECT macro and generate a meta-object when compiling for 10.6, - // which obviously won't link. - // - // So the trick is to still compile this class on 10.6, but never instantiate it. - Q_UNUSED(streamRef); Q_UNUSED(numEvents); Q_UNUSED(eventPaths); diff --git a/src/corelib/io/qsettings_mac.cpp b/src/corelib/io/qsettings_mac.cpp index d73cc4d298..72160a4769 100644 --- a/src/corelib/io/qsettings_mac.cpp +++ b/src/corelib/io/qsettings_mac.cpp @@ -541,31 +541,7 @@ void QMacSettingsPrivate::sync() domains[i].userName, hostNames[j]); // only report failures for the primary file (the one we write to) if (!ok && i == 0 && hostNames[j] == hostName && status == QSettings::NoError) { -#if 1 - if (QSysInfo::macVersion() < QSysInfo::MV_10_7) { - // work around what seems to be a bug in CFPreferences: - // don't report an error if there are no preferences for the application - QCFType appIds = CFPreferencesCopyApplicationList(domains[i].userName, - hostNames[j]); - - // iterate through all the applications and see if we're there - CFIndex size = CFArrayGetCount(appIds); - for (CFIndex k = 0; k < size; ++k) { - const void *cfvalue = CFArrayGetValueAtIndex(appIds, k); - if (CFGetTypeID(cfvalue) == CFStringGetTypeID()) { - if (CFStringCompare(static_cast(cfvalue), - domains[i].applicationOrSuiteId, - kCFCompareCaseInsensitive) == kCFCompareEqualTo) { - setStatus(QSettings::AccessError); - break; - } - } - } - } else -#endif - { - setStatus(QSettings::AccessError); - } + setStatus(QSettings::AccessError); } } } -- cgit v1.2.3