diff options
Diffstat (limited to 'sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp index ea6559689..73b1638ef 100644 --- a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp +++ b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp @@ -444,10 +444,11 @@ void BuilderPrivate::addBaseClass(const CXCursor &cursor) QString baseClassName = getTypeName(inheritedType); // use type. const CXCursor declCursor = clang_getTypeDeclaration(inheritedType); const CursorClassHash::const_iterator it = m_cursorClassHash.constFind(declCursor); + const CodeModel::AccessPolicy access = accessPolicy(clang_getCXXAccessSpecifier(cursor)); if (it == m_cursorClassHash.constEnd()) { // Set unqualified name. This happens in cases like "class X : public std::list<...>" // "template<class T> class Foo : public T" and standard types like true_type, false_type. - m_currentClass->setBaseClasses(m_currentClass->baseClasses() << baseClassName); + m_currentClass->addBaseClass(baseClassName, access); return; } // Completely qualify the class name by looking it up and taking its scope @@ -468,7 +469,7 @@ void BuilderPrivate::addBaseClass(const CXCursor &cursor) baseClassName.prepend(colonColon()); baseClassName.prepend(baseScope.join(colonColon())); } - m_currentClass->setBaseClasses(m_currentClass->baseClasses() << baseClassName); + m_currentClass->addBaseClass(baseClassName, access); } static inline CXCursor definitionFromTypeRef(const CXCursor &typeRefCursor) |