summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2016-10-18 19:02:41 (GMT)
committerGitHub <noreply@github.com>2016-10-18 19:02:41 (GMT)
commit62f09103b77b9e5b4093d248563e2f9d76b65728 (patch)
tree0e6be6a583e4d508a4a75fc2bc83cd4ebe78b388 /src
parent20cba183e8b99c378be8754a2a72f0816bead1e0 (diff)
parentc7b740d96288f19e31bd35405306c49bb9fc20c4 (diff)
downloadDoxygen-62f09103b77b9e5b4093d248563e2f9d76b65728.zip
Doxygen-62f09103b77b9e5b4093d248563e2f9d76b65728.tar.gz
Doxygen-62f09103b77b9e5b4093d248563e2f9d76b65728.tar.bz2
Merge pull request #538 from anderswallander/plantuml_qt
Add plantuml support to Qt compressed help file
Diffstat (limited to 'src')
-rw-r--r--src/htmldocvisitor.cpp4
-rw-r--r--src/plantuml.cpp15
2 files changed, 12 insertions, 7 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index d1fb06c..149ddae 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(fileName,outDir,PUML_SVG);
+ generatePlantUMLOutput(baseName,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(fileName,outDir,PUML_BITMAP);
+ generatePlantUMLOutput(baseName,outDir,PUML_BITMAP);
m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />" << endl;
}
}
diff --git a/src/plantuml.cpp b/src/plantuml.cpp
index 1171289..3b113fb 100644
--- a/src/plantuml.cpp
+++ b/src/plantuml.cpp
@@ -16,6 +16,8 @@
#include "plantuml.h"
#include "portable.h"
#include "config.h"
+#include "doxygen.h"
+#include "index.h"
#include "message.h"
#include <qdir.h>
@@ -84,28 +86,30 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp
pumlArgs+="-o \"";
pumlArgs+=outDir;
pumlArgs+="\" ";
- QCString extension;
+ QCString imgName = baseName;
switch (format)
{
case PUML_BITMAP:
pumlArgs+="-tpng";
- extension=".png";
+ imgName+=".png";
break;
case PUML_EPS:
pumlArgs+="-teps";
- extension=".eps";
+ imgName+=".eps";
break;
case PUML_SVG:
pumlArgs+="-tsvg";
- extension=".svg";
+ imgName+=".svg";
break;
}
pumlArgs+=" \"";
+ pumlArgs+=outDir;
+ pumlArgs+="/";
pumlArgs+=baseName;
pumlArgs+=".pu\" ";
pumlArgs+="-charset UTF-8 ";
int exitCode;
- //printf("*** running: %s %s outDir:%s %s\n",pumlExe.data(),pumlArgs.data(),outDir,outFile);
+ //printf("*** running: %s %s outDir:%s %s\n",pumlExe.data(),pumlArgs.data(),outDir,baseName);
msg("Running PlantUML on generated file %s.pu\n",baseName);
portable_sysTimerStart();
if ((exitCode=portable_system(pumlExe,pumlArgs,TRUE))!=0)
@@ -129,5 +133,6 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp
}
portable_sysTimerStop();
}
+ Doxygen::indexList->addImageFile(imgName);
}