Commit 6d142956 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix incomplete uml object generating on c++ import when a class contains a typedef to itself.

Example:
	class Bar {
	public:
	    typedef Bar* (*Foo)();
	};

CCBUG:330018
parent d65986c8
......@@ -139,9 +139,13 @@ void CppTree2Uml::parseTypedef(TypedefAST* ast)
bool isDatatype = Import_Utils::isDatatype(typeId, m_currentNamespace[m_nsCnt]);
if (type.contains('*') || isDatatype) {
UMLObject *inner =
Import_Utils::createUMLObject(UMLObject::ot_Class, typeId,
m_currentNamespace[m_nsCnt]);
UMLObject *inner = 0;
if (m_currentNamespace[m_nsCnt]->baseType() == UMLObject::ot_Class &&
typeId == m_currentNamespace[m_nsCnt]->name())
inner = m_currentNamespace[m_nsCnt];
else
inner = Import_Utils::createUMLObject(UMLObject::ot_Class, typeId,
m_currentNamespace[m_nsCnt]);
UMLObject *typedefObj =
Import_Utils::createUMLObject(UMLObject::ot_Datatype, id,
m_currentNamespace[m_nsCnt]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment