From f8e39a66569b27bb45cc7a49508dba29038122a4 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 4 Feb 2020 14:47:28 +0100 Subject: [PATCH] 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 --- src/corelib/io/qfilesystemengine_unix.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index eed34086b48..eaf4e2d9afe 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)