Skip to content

Commit d851a1d

Browse files
committed
Possibility to see the temporary files used for formulas
In the issue #10096 there was a problem with the bounding box of the formulas, to inspect the temporary files it would need a rebuild with the remove flag unset. With the -option `-d formula` it is now possible to get the these files (
1 parent f36d30b commit d851a1d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/debug.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ static std::map< std::string, Debug::DebugMask > s_labels =
3232
{ "nolineno", Debug::NoLineNo },
3333
{ "commentcnv", Debug::CommentCnv },
3434
{ "commentscan", Debug::CommentScan },
35+
{ "formula", Debug::Formula },
3536
{ "printtree", Debug::PrintTree },
3637
{ "time", Debug::Time },
3738
{ "extcmd", Debug::ExtCmd },

src/debug.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Debug
2828
Preprocessor = 0x0001,
2929
CommentCnv = 0x0002,
3030
CommentScan = 0x0004,
31+
Formula = 0x0008,
3132
PrintTree = 0x0010,
3233
Time = 0x0020,
3334
ExtCmd = 0x0040,

src/formula.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,14 @@
3131
#include "threadpool.h"
3232
#include "portable.h"
3333
#include "latexgen.h"
34+
#include "debug.h"
3435

3536
// TODO: remove these dependencies
3637
#include "doxygen.h" // for Doxygen::indexList
3738
#include "indexlist.h" // for Doxygen::indexList
3839

3940
static int determineInkscapeVersion(const Dir &thisDir);
4041

41-
// Remove the temporary files
42-
#define RM_TMP_FILES (true)
43-
//#define RM_TMP_FILES (false)
44-
4542
struct FormulaManager::Private
4643
{
4744
LinkedMap<Formula> formulas;
@@ -663,7 +660,7 @@ void FormulaManager::generateImages(const QCString &path,Format format,HighDPI h
663660
}
664661

665662
// clean up temporary files
666-
if (RM_TMP_FILES)
663+
if (!Debug::isFlagSet(Debug::Formula))
667664
{
668665
for (const auto &file : p->tempFiles)
669666
{
@@ -761,7 +758,7 @@ static int determineInkscapeVersion(const Dir &thisDir)
761758
{
762759
return -1;
763760
}
764-
if (RM_TMP_FILES)
761+
if (!Debug::isFlagSet(Debug::Formula))
765762
{
766763
thisDir.remove(inkscapeVersionFile.str());
767764
}

0 commit comments

Comments
 (0)