diff options
author | albert-github <albert.tests@gmail.com> | 2020-10-13 12:15:24 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-10-13 12:15:24 (GMT) |
commit | 5b9a140ded861438b6b630b08f846dd73a60c585 (patch) | |
tree | e4d6d2fa41444c86c023c87d2b4ed8aa39eab28b /src/formula.cpp | |
parent | f64705ecdeff9eead62e63f27b2ba88bea87c259 (diff) | |
download | Doxygen-5b9a140ded861438b6b630b08f846dd73a60c585.zip Doxygen-5b9a140ded861438b6b630b08f846dd73a60c585.tar.gz Doxygen-5b9a140ded861438b6b630b08f846dd73a60c585.tar.bz2 |
Don't start dvips when latex fails for formulas
In case the latex process fails for formulas there is no reason to try to start a dvips process.
Diffstat (limited to 'src/formula.cpp')
-rw-r--r-- | src/formula.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/formula.cpp b/src/formula.cpp index ca50c9c..8ba9729 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -148,7 +148,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c // store the original directory if (!d.exists()) { - term("Output dir %s does not exist!\n",path); + term("Output directory '%s' does not exist!\n",path); } QCString oldDir = QDir::currentDirPath().utf8(); QCString macroFile = Config_getString(FORMULA_MACROFILE); @@ -167,7 +167,6 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c QCString texName="_formulas.tex"; IntVector formulasToGenerate; QFile f(texName); - bool formulaError=FALSE; if (f.open(IO_WriteOnly)) { FTextStream t(&f); @@ -214,8 +213,9 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c { err("Problems running latex. Check your installation or look " "for typos in _formulas.tex and check _formulas.log!\n"); - formulaError=TRUE; - //return; + Portable::sysTimerStop(); + QDir::setCurrent(oldDir); + return; } Portable::sysTimerStop(); //printf("Running dvips...\n"); @@ -439,12 +439,12 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c if (RM_TMP_FILES) { thisDir.remove("_formulas.dvi"); - if (!formulaError) thisDir.remove("_formulas.log"); // keep file in case of errors + thisDir.remove("_formulas.log"); // keep file in case of errors thisDir.remove("_formulas.aux"); } } // remove the latex file itself - if (RM_TMP_FILES && !formulaError) thisDir.remove("_formulas.tex"); + if (RM_TMP_FILES) thisDir.remove("_formulas.tex"); // write/update the formula repository so we know what text the // generated images represent (we use this next time to avoid regeneration |