diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-11-02 15:53:52 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-11-06 12:08:20 +0100 |
commit | b57435d6556f047baf1c232e5def522727fd1dcd (patch) | |
tree | e13de046766991d31773176c1779a07ada238580 | |
parent | 4d68e18f06ffa12b5825d32f30a2ff1e2b5943d8 (diff) |
libshiboken: Do a directory check when considering system includes
Otherwise system paths that are passed by yocto that don't end in a
slash are considered files rather than directories and we don't end up
processing files within those directories.
Amends 7cc5c139482d735c49002649d26bb524c92cc86b
Task-number: PYSIDE-1958
Change-Id: I25d809c3cbf101c4780beb98ee1359c3df67b8d1
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit e70a4645e9f3a734a6fdf64b8fbb84f76a687d49)
-rw-r--r-- | sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp index bb072274c..82cad52f0 100644 --- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp +++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp @@ -875,7 +875,8 @@ bool Builder::visitLocation(const QString &fileName, LocationType locationType) void Builder::setForceProcessSystemIncludes(const QStringList &systemIncludes) { for (const auto &i : systemIncludes) { - if (i.endsWith(u'/')) + QFileInfo fi(i); + if (fi.exists() && fi.isDir()) d->m_forceProcessSystemIncludePaths.append(i); else d->m_forceProcessSystemIncludes.append(i); |