summaryrefslogtreecommitdiffstats
path: root/src/plantuml.cpp
diff options
context:
space:
mode:
authorAnders Wallander <anders.wallander@volvocars.com>2016-10-19 09:11:49 (GMT)
committerAnders Wallander <anders.wallander@volvocars.com>2016-10-19 09:11:49 (GMT)
commit6c87c75e197e673d74949839d59fe8b0842e86ff (patch)
tree06d6f10d83e26f1cfa6f755a6918f6943b2a2eaf /src/plantuml.cpp
parent2c32f65c0e7207654644baf283e88b5e93a7d4ee (diff)
downloadDoxygen-6c87c75e197e673d74949839d59fe8b0842e86ff.zip
Doxygen-6c87c75e197e673d74949839d59fe8b0842e86ff.tar.gz
Doxygen-6c87c75e197e673d74949839d59fe8b0842e86ff.tar.bz2
Fix plantuml generation issue
Commit 62f09103b77b9e5b4093d248563e2f9d76b65728 which merged pull request 538 introduced a bug in the generation of plantuml diagrams for other plantuml sources than the htmldocvisitor. In the previous commit the baseName argument was wrongly interpreted as file name without path. This commit fix this issue so the behaviour should be the same as before, while still also having the support for PlantUML diagrams in Qt compressed help files.
Diffstat (limited to 'src/plantuml.cpp')
-rw-r--r--src/plantuml.cpp9
1 files changed, 7 insertions, 2 deletions
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 ";