diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-08-24 15:41:42 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-08-31 12:35:45 +0000 |
commit | b02fe1bfe7bc5daa503dc3a274570aad0d8dca5a (patch) | |
tree | fe7ee1d385fd4da060d48569df721554f94db56e /src/corelib/io/qfilesystemengine_unix.cpp | |
parent | 29c0377f07f4942f9957ea87d59c252148dc9e5b (diff) | |
download | qtbase-b02fe1bfe7bc5daa503dc3a274570aad0d8dca5a.tar.gz |
Remove codepaths and checks for unsupported Apple platforms
We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3.
Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystemengine_unix.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemengine_unix.cpp | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index eebf36416e..0159bc4128 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -76,9 +76,7 @@ #endif #if defined(Q_OS_DARWIN) -# if QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE(101200, 100000, 100000, 30000) -# include <sys/clonefile.h> -# endif +# include <sys/clonefile.h> # include <copyfile.h> // We cannot include <Foundation/Foundation.h> (it's an Objective-C header), but // we need these declarations: @@ -1258,20 +1256,18 @@ bool QFileSystemEngine::createLink(const QFileSystemEntry &source, const QFileSy //static bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error) { -#if QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE(101200, 100000, 100000, 30000) - if (__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *)) { - if (::clonefile(source.nativeFilePath().constData(), - target.nativeFilePath().constData(), 0) == 0) - return true; - error = QSystemError(errno, QSystemError::StandardLibraryError); - return false; - } +#if defined(Q_OS_DARWIN) + if (::clonefile(source.nativeFilePath().constData(), + target.nativeFilePath().constData(), 0) == 0) + return true; + error = QSystemError(errno, QSystemError::StandardLibraryError); + return false; #else Q_UNUSED(source); Q_UNUSED(target); -#endif error = QSystemError(ENOSYS, QSystemError::StandardLibraryError); //Function not implemented return false; +#endif } //static @@ -1295,13 +1291,11 @@ bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSy } #endif #if defined(Q_OS_DARWIN) && defined(RENAME_EXCL) - if (__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *)) { - if (renameatx_np(AT_FDCWD, srcPath, AT_FDCWD, tgtPath, RENAME_EXCL) == 0) - return true; - if (errno != ENOTSUP) { - error = QSystemError(errno, QSystemError::StandardLibraryError); - return false; - } + if (renameatx_np(AT_FDCWD, srcPath, AT_FDCWD, tgtPath, RENAME_EXCL) == 0) + return true; + if (errno != ENOTSUP) { + error = QSystemError(errno, QSystemError::StandardLibraryError); + return false; } #endif |