From c7348b4483ace9b5608fbbe949eab02921eb0e70 Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Fri, 7 Jul 2017 13:51:51 +0200 Subject: [PATCH] dot.cpp: Fix DotGfxHierarchyTable first class node loop * Upon 'inherits' diagram creation, the first element (alphabetically last parent name) would use a default node number 0, equal to the child element, and would result in a class looping on itself as parent * A simple test to confirm the issue can be done with the following lines in a test.h inside an empty project: // Test first class node loop class aChildClass : public zParentClass { }; class bChildClass : public yParentClass { }; Change-Id: I7901e5e13d9564747d112e0b8c758d239d43a380 Signed-off-by: Adrian DC --- src/dot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dot.cpp b/src/dot.cpp index 4189748a055..627989f2c22 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -2477,7 +2477,7 @@ void DotGfxHierarchyTable::addClassList(ClassSDict *cl) } } -DotGfxHierarchyTable::DotGfxHierarchyTable() : m_curNodeNumber(0) +DotGfxHierarchyTable::DotGfxHierarchyTable() : m_curNodeNumber(1) { m_rootNodes = new QList; m_usedNodes = new QDict(1009);