diff options
author | albert-github <albert.tests@gmail.com> | 2018-06-10 13:23:04 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-06-10 13:23:04 (GMT) |
commit | af7dfbdda302e55fb8a62ab224184abccab3d167 (patch) | |
tree | a9e92d05dc9fed077aac18eab07259e575b33908 /src | |
parent | 4536982bdebc0056d0c5d64a12881f20b5801c06 (diff) | |
download | Doxygen-af7dfbdda302e55fb8a62ab224184abccab3d167.zip Doxygen-af7dfbdda302e55fb8a62ab224184abccab3d167.tar.gz Doxygen-af7dfbdda302e55fb8a62ab224184abccab3d167.tar.bz2 |
Bug 395343 - caller graph can be improved by having caller on left & callee on right
Caller graph will now have the called function on the right hand side.
Diffstat (limited to 'src')
-rw-r--r-- | src/dot.cpp | 18 | ||||
-rw-r--r-- | src/dot.h | 3 |
2 files changed, 15 insertions, 6 deletions
diff --git a/src/dot.cpp b/src/dot.cpp index 5adc2ab..0df70c5 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -3071,14 +3071,19 @@ QCString computeMd5Signature(DotNode *root, bool renderParents, bool backArrows, const QCString &title, - QCString &graphStr + QCString &graphStr, + const char *rank ) { //printf("computeMd5Signature\n"); QGString buf; FTextStream md5stream(&buf); writeGraphHeader(md5stream,title); - if (lrRank) + if (rank) + { + md5stream << " rankdir=\"" << rank << "\";" << endl; + } + else if (lrRank) { md5stream << " rankdir=\"LR\";" << endl; } @@ -3132,14 +3137,15 @@ static bool updateDotGraph(DotNode *root, bool lrRank, bool renderParents, bool backArrows, - const QCString &title=QCString() + const QCString &title=QCString(), + const char *rank = NULL ) { QCString theGraph; // TODO: write graph to theGraph, then compute md5 checksum QCString md5 = computeMd5Signature( root,gt,format,lrRank,renderParents, - backArrows,title,theGraph); + backArrows,title,theGraph, rank); QFile f(baseName+".dot"); if (f.open(IO_WriteOnly)) { @@ -3872,6 +3878,7 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma QCString absImgName = absBaseName+"."+imgExt; bool regenerate = FALSE; + if (updateDotGraph(m_startNode, DotNode::CallGraph, absBaseName, @@ -3879,7 +3886,8 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma TRUE, // lrRank FALSE, // renderParents m_inverse, // backArrows - m_startNode->label() + m_startNode->label(), + (m_inverse ? "RL" : "LR") ) || !checkDeliverables(graphFormat==GOF_BITMAP ? absImgName : usePDFLatex ? absPdfName : absEpsName, @@ -137,7 +137,8 @@ class DotNode bool lrRank, bool renderParents, bool backArrows, const QCString &title, - QCString &graphStr + QCString &graphStr, + const char *rank ); }; |