diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-09-10 20:19:09 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-09-10 20:19:09 (GMT) |
commit | cc4253926526efc87385de9640e64cd5cf062ada (patch) | |
tree | 3bddf87f17e99be18dfcd24d460b9e4f264964bc /src/configimpl.l | |
parent | 81da20ff839843634ee6db5f517bfcb7ef87d4b9 (diff) | |
download | Doxygen-cc4253926526efc87385de9640e64cd5cf062ada.zip Doxygen-cc4253926526efc87385de9640e64cd5cf062ada.tar.gz Doxygen-cc4253926526efc87385de9640e64cd5cf062ada.tar.bz2 |
Refactoring code for dot related source files
Diffstat (limited to 'src/configimpl.l')
-rw-r--r-- | src/configimpl.l | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/configimpl.l b/src/configimpl.l index 2d91e12..e52a757 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -30,6 +30,7 @@ #include <qregexp.h> #include <qstack.h> #include <qglobal.h> +#include <qthread.h> #include "configimpl.h" #include "version.h" @@ -1531,6 +1532,7 @@ void Config::checkAndCorrect() // dotImageFormat = "png"; //} + // correct DOT_FONTNAME if needed QCString &dotFontName=Config_getString(DOT_FONTNAME); if (dotFontName=="FreeSans" || dotFontName=="FreeSans.ttf") { @@ -1538,7 +1540,32 @@ void Config::checkAndCorrect() "You may want to clear or change DOT_FONTNAME.\n" "Otherwise you run the risk that the wrong font is being used for dot generated graphs.\n"); } + else if (dotFontName.isEmpty()) + { + dotFontName = "Helvetica"; + } + // clip dotFontSize against the maximum bounds + int &dotFontSize = Config_getInt(DOT_FONTSIZE); + if (dotFontSize<4) + { + dotFontSize=4; + } + else if (dotFontSize>24) + { + dotFontSize=24; + } + + // clip number of threads + int &dotNumThreads = Config_getInt(DOT_NUM_THREADS); + if (dotNumThreads>32) + { + dotNumThreads=32; + } + else if (dotNumThreads<=0) + { + dotNumThreads=QMAX(2,QThread::idealThreadCount()+1); + } // check dot path QCString &dotPath = Config_getString(DOT_PATH); |