From 17b66265ace3418413b5cfab0335b4378e9c176b Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 28 Dec 2015 20:55:44 +0100 Subject: Bug 742715 - Unnamed structs gives: QGDict::hashAsciiKey: Invalid null key --- src/dot.cpp | 13 +++++++++---- src/memberdef.cpp | 7 ++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/dot.cpp b/src/dot.cpp index 2f245f6..0a4f136 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -2594,7 +2594,12 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, int edgeStyle = (label || prot==EdgeInfo::Orange || prot==EdgeInfo::Orange2) ? EdgeInfo::Dashed : EdgeInfo::Solid; QCString className; - if (usedName) // name is a typedef + if (cd->isAnonymous()) + { + className="anonymous:"; + className+=label; + } + else if (usedName) // name is a typedef { className=usedName; } @@ -2822,9 +2827,9 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,bool base,int distance) if (m_graphType == DotNode::Collaboration) { // ---- Add usage relations - - UsesClassDict *dict = - base ? cd->usedImplementationClasses() : + + UsesClassDict *dict = + base ? cd->usedImplementationClasses() : cd->usedByImplementationClasses() ; if (dict) diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 48e16e0..af4a690 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1516,12 +1516,17 @@ void MemberDef::writeDeclaration(OutputList &ol, ol.writeNonBreakableSpace(3); } QCString varName=ltype.right(ltype.length()-ir).stripWhiteSpace(); - //printf(">>>>>> indDepth=%d ltype=`%s' varName=`%s'\n",indDepth,ltype.data(),varName.data()); + //printf(">>>>>> ltype=`%s' varName=`%s'\n",ltype.data(),varName.data()); ol.docify("}"); if (varName.isEmpty() && (name().isEmpty() || name().at(0)=='@')) { ol.docify(";"); } + else if (!varName.isEmpty() && (varName.at(0)=='*' || varName.at(0)=='&')) + { + ol.docify(" "); + ol.docify(varName); + } endAnonScopeNeeded=TRUE; } else -- cgit v0.12