aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-09-29 16:07:50 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-29 16:19:21 +0000
commit296b3453c7f9e80750b930b10989be8a3a82fce9 (patch)
treeea1d9f189641d10532f00540ab33134c889bfb9c
parent73db21f200cbde481a6832cee6ea55c26730d93c (diff)
shiboken6/macOS: Fix C++ 11 integer types (int32_t, ...) not being recognized
The system type headers were not parsed when Xcode was installed under /Applications/Xcode.app/Contents/Developer/..., causing the typedefs not to be seen and int32_t being handled as unknown primitive types. The array modifications for the OpenGL functions were then not generated correctly. Fix by using QString::contains() for checking. Change-Id: Ia4344599807a9fcc3d4de5bbe850575faace4b3e Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 92943cbb530edb4fd8b7292b3b0ea964d7a6fdde) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
index 7f9fb42b8..7a88e45d9 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
@@ -849,10 +849,11 @@ bool BuilderPrivate::visitHeader(const QString &fileName) const
case Platform::macOS:
// Parse the following system headers to get the correct typdefs for types like
// int32_t, which are used in the macOS implementation of OpenGL framework.
+ // They are installed under /Applications/Xcode.app/Contents/Developer/Platforms...
if (baseName == u"gltypes.h"
- || fileName.startsWith(u"/usr/include/_types")
- || fileName.startsWith(u"/usr/include/_types")
- || fileName.startsWith(u"/usr/include/sys/_types")) {
+ || fileName.contains(u"/usr/include/_types")
+ || fileName.contains(u"/usr/include/_types")
+ || fileName.contains(u"/usr/include/sys/_types")) {
return true;
}
break;