diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-02-04 14:47:28 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-02-04 17:48:46 +0100 |
commit | f8e39a66569b27bb45cc7a49508dba29038122a4 (patch) | |
tree | 7d24b68a574cababb94088d296a6f8daf23328ce /src/corelib/io/qfilesystemengine_unix.cpp | |
parent | 336b3bb0dd494409b89e1de480eb7204ff7b554e (diff) | |
download | qtbase-f8e39a66569b27bb45cc7a49508dba29038122a4.tar.gz |
Fix build of bootstrapped tools with clang 10
Building of qmake fails with clang 10 due to QStorageInfo symbols not
being resolved. Since bootstrapped tools don't need this functionality,
we can remove the respective code and make the function fail as "not
implemented".
Change-Id: I48bbbd822e4f70630d903e5caead1a08fe4f13a8
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystemengine_unix.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemengine_unix.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index eed34086b4..eaf4e2d9af 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -1203,6 +1203,9 @@ bool QFileSystemEngine::createLink(const QFileSystemEntry &source, const QFileSy /* Implementing as per https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html */ + +// bootstrapped tools don't need this, and we don't want QStorageInfo +#ifndef QT_BOOTSTRAPPED static QString freeDesktopTrashLocation(const QString &sourcePath) { auto makeTrashDir = [](const QDir &topDir, const QString &trashDir) -> QString { @@ -1298,11 +1301,18 @@ static QString freeDesktopTrashLocation(const QString &sourcePath) return trash; } +#endif // QT_BOOTSTRAPPED //static bool QFileSystemEngine::moveFileToTrash(const QFileSystemEntry &source, QFileSystemEntry &newLocation, QSystemError &error) { +#ifdef QT_BOOTSTRAPPED + Q_UNUSED(source); + Q_UNUSED(newLocation); + error = QSystemError(ENOSYS, QSystemError::StandardLibraryError); + return false; +#else const QFileInfo sourceInfo(source.filePath()); if (!sourceInfo.exists()) { error = QSystemError(ENOENT, QSystemError::StandardLibraryError); @@ -1395,8 +1405,9 @@ bool QFileSystemEngine::moveFileToTrash(const QFileSystemEntry &source, newLocation = QFileSystemEntry(targetPath); return true; +#endif // QT_BOOTSTRAPPED } -#endif +#endif // Q_OS_DARWIN //static bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error) |