Skip to content

Commit 8bb715a

Browse files
committed
Remove temporary file
When using `HAVE_DOT=NO` the internal doxygen generator for class type diagrams a temporary `eps` file is created in the latex directory to generate the `pdf` file (`epstopdf`) this is now removed when `epstopdf` is successful.
1 parent bcb258b commit 8bb715a

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

src/dia.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ void writeDiaGraphFromFile(const QCString &inFile,const QCString &outDir,
7575
{
7676
err("Problems running epstopdf. Check your TeX installation!\n");
7777
}
78+
else
79+
{
80+
Dir().remove((outFile + ".eps").data());
81+
}
7882
}
7983

8084
error:

src/diagram.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "classlist.h"
3030
#include "textstream.h"
3131
#include "growbuf.h"
32+
#include "dir.h"
3233

3334
//-----------------------------------------------------------------------------
3435

@@ -1357,6 +1358,10 @@ void ClassDiagram::writeFigure(TextStream &output,const QCString &path,
13571358
err("Problems running epstopdf. Check your TeX installation!\n");
13581359
return;
13591360
}
1361+
else
1362+
{
1363+
Dir().remove((epsBaseName + ".eps").data());
1364+
}
13601365
}
13611366
}
13621367

src/docparser.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ QCString DocParser::findAndCopyImage(const QCString &fileName, DocImage::Type ty
179179
{
180180
err("Problems running epstopdf. Check your TeX installation!\n");
181181
}
182+
else
183+
{
184+
Dir().remove((outputDir + "/" + baseName + ".eps").data());
185+
}
182186
return baseName;
183187
}
184188
}

src/msc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ void writeMscGraphFromFile(const QCString &inFile,const QCString &outDir,
196196
err_full(srcFile,srcLine,"Problems running epstopdf when processing '%s.eps'. Check your TeX installation!",
197197
qPrint(absOutFile));
198198
}
199+
else
200+
{
201+
Dir().remove((absOutFile + ".eps").data());
202+
}
199203
}
200204

201205
int i=std::max(imgName.findRev('/'),imgName.findRev('\\'));

src/plantuml.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ static void runPlantumlContent(const PlantumlManager::FilesMap &plantumlFiles,
299299
{
300300
err_full(nb.srcFile,nb.srcLine,"Problems running epstopdf. Check your TeX installation! Exit code: %d.",exitCode);
301301
}
302+
else
303+
{
304+
Dir().remove((pumlOutDir + QCString(str) + ".eps").data());
305+
}
302306
}
303307
}
304308
}

0 commit comments

Comments
 (0)