summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-29 09:02:02 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-29 15:45:07 -0300
commite34d19b113b6460560de61e5ba40068f91b991ef (patch)
tree3c44bbcbd63c734c3ec4098a7f9c0cb732600c73
parentfa4b91e8de101ffb63dcfee6ae95a36e5755fb77 (diff)
downloadshiboken-e34d19b113b6460560de61e5ba40068f91b991ef.tar.gz
shiboken-e34d19b113b6460560de61e5ba40068f91b991ef.tar.xz
shiboken-e34d19b113b6460560de61e5ba40068f91b991ef.zip
Use qualified C++ names on multiple inheritance helper functions.
-rw-r--r--cppgenerator.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 08a597d6..21994fa9 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -1656,13 +1656,14 @@ void CppGenerator::writeMethodCall(QTextStream& s, const AbstractMetaFunction* f
QStringList CppGenerator::getAncestorMultipleInheritance(const AbstractMetaClass* metaClass)
{
QStringList result;
- if (!metaClass->baseClassNames().isEmpty()) {
- foreach (QString base, metaClass->baseClassNames()) {
- result.append(QString("((size_t) static_cast<const %1*>(class_ptr)) - base").arg(base));
- result.append(QString("((size_t) static_cast<const %1*>((%2*)((void*)class_ptr))) - base").arg(base).arg(metaClass->name()));
- }
- foreach (const AbstractMetaClass* pClass, getBaseClasses(metaClass))
- result.append(getAncestorMultipleInheritance(pClass));
+ AbstractMetaClassList baseClases = getBaseClasses(metaClass);
+ if (!baseClases.isEmpty()) {
+ foreach (const AbstractMetaClass* baseClass, baseClases) {
+ result.append(QString("((size_t) static_cast<const %1*>(class_ptr)) - base").arg(baseClass->qualifiedCppName()));
+ result.append(QString("((size_t) static_cast<const %1*>((%2*)((void*)class_ptr))) - base").arg(baseClass->qualifiedCppName()).arg(metaClass->qualifiedCppName()));
+ }
+ foreach (const AbstractMetaClass* baseClass, baseClases)
+ result.append(getAncestorMultipleInheritance(baseClass));
}
return result;
}