diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-10-20 19:42:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-20 19:42:14 (GMT) |
commit | d6ec94c3b7f583f4074142a6302ffd48f45ddd2e (patch) | |
tree | 06d6f10d83e26f1cfa6f755a6918f6943b2a2eaf /src | |
parent | 2c32f65c0e7207654644baf283e88b5e93a7d4ee (diff) | |
parent | 6c87c75e197e673d74949839d59fe8b0842e86ff (diff) | |
download | Doxygen-d6ec94c3b7f583f4074142a6302ffd48f45ddd2e.zip Doxygen-d6ec94c3b7f583f4074142a6302ffd48f45ddd2e.tar.gz Doxygen-d6ec94c3b7f583f4074142a6302ffd48f45ddd2e.tar.bz2 |
Merge pull request #539 from anderswallander/plantuml_qt_fix
Fix plantuml generation issue
Diffstat (limited to 'src')
-rw-r--r-- | src/htmldocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/plantuml.cpp | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 149ddae..d1fb06c 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -2082,7 +2082,7 @@ void HtmlDocVisitor::writePlantUMLFile(const QCString &fileName, QCString imgExt = getDotImageExtension(); if (imgExt=="svg") { - generatePlantUMLOutput(baseName,outDir,PUML_SVG); + generatePlantUMLOutput(fileName,outDir,PUML_SVG); //m_t << "<iframe scrolling=\"no\" frameborder=\"0\" src=\"" << relPath << baseName << ".svg" << "\" />" << endl; //m_t << "<p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p>"; //m_t << "</iframe>" << endl; @@ -2090,7 +2090,7 @@ void HtmlDocVisitor::writePlantUMLFile(const QCString &fileName, } else { - generatePlantUMLOutput(baseName,outDir,PUML_BITMAP); + generatePlantUMLOutput(fileName,outDir,PUML_BITMAP); m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />" << endl; } } diff --git a/src/plantuml.cpp b/src/plantuml.cpp index 3b113fb..f97f690 100644 --- a/src/plantuml.cpp +++ b/src/plantuml.cpp @@ -87,6 +87,13 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp pumlArgs+=outDir; pumlArgs+="\" "; QCString imgName = baseName; + // The basename contains path, we need to strip the path from the filename in order + // to create the image file name which should be included in the index.qhp (Qt help index file). + int i; + if ((i=imgName.findRev('/'))!=-1) // strip path + { + imgName=imgName.right(imgName.length()-i-1); + } switch (format) { case PUML_BITMAP: @@ -103,8 +110,6 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp break; } pumlArgs+=" \""; - pumlArgs+=outDir; - pumlArgs+="/"; pumlArgs+=baseName; pumlArgs+=".pu\" "; pumlArgs+="-charset UTF-8 "; |