From d5578494bfc9342ae83b544a5200aa630ec0b2eb Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 13 Jan 2021 13:42:31 +0100 Subject: issue #8329 Force line buffering By default stdout is buffered when redirecting, the `-b` option of doxygen prevents this. Removing non used variable `outputToWizard`. --- doc/faq.doc | 8 ++++++++ src/doxygen.cpp | 4 +--- src/doxygen.h | 1 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/faq.doc b/doc/faq.doc index 95de571..b904cac 100644 --- a/doc/faq.doc +++ b/doc/faq.doc @@ -306,6 +306,14 @@ Doc++ but that just wasn't good enough (it didn't support signals and slots and did not have the Qt look and feel I had grown to like), so I started to write my own tool... +\section faq_bin How to prevent interleaved output + +When redirecting all the console output of doxygen, i.e. messages and warnings, this can be interleaved or +in a non-expected order. +The, technical, reason for this is that the `stdout` can be buffered. +It is possible to overcome this by means of the `-b` of doxygen, like e.g `doxygen -b > out.txt 2>&1`. +Note this might cost a little more time though. + \htmlonly Go to the next section or return to the index. diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 3fdde9b..4e09c19 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -145,7 +145,6 @@ bool Doxygen::parseSourcesNeeded = FALSE; SearchIndexIntf *Doxygen::searchIndex=0; SymbolMap Doxygen::symbolMap; ClangUsrMap *Doxygen::clangUsrMap = 0; -bool Doxygen::outputToWizard=FALSE; Cache *Doxygen::lookupCache; DirLinkedMap *Doxygen::dirLinkedMap; DirRelationLinkedMap Doxygen::dirRelations; @@ -10076,7 +10075,7 @@ static void devUsage() { msg("Developer parameters:\n"); msg(" -m dump symbol map\n"); - msg(" -b output to wizard\n"); + msg(" -b making messages output unbuffered\n"); msg(" -T activates output generation via Django like template\n"); msg(" -d enable a debug level, such as (multiple invocations of -d are possible):\n"); Debug::printFlags(); @@ -10550,7 +10549,6 @@ void readConfiguration(int argc, char **argv) break; case 'b': setvbuf(stdout,NULL,_IONBF,0); - Doxygen::outputToWizard=TRUE; break; case 'T': msg("Warning: this option activates output generation via Django like template files. " diff --git a/src/doxygen.h b/src/doxygen.h index 1886c0e..9442d9e 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -121,7 +121,6 @@ class Doxygen static SearchIndexIntf *searchIndex; static SymbolMap symbolMap; static ClangUsrMap *clangUsrMap; - static bool outputToWizard; static Cache *lookupCache; static DirLinkedMap *dirLinkedMap; static DirRelationLinkedMap dirRelations; -- cgit v0.12 From 7e08dcdc7b10f9a080dd26731e7859f07392a500 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 13 Jan 2021 21:01:30 +0100 Subject: Avoid writing artifically created classes to the tag file --- src/classdef.cpp | 9 +++++++-- src/doxygen.cpp | 5 +---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/classdef.cpp b/src/classdef.cpp index 88bc44c..3b0390f 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2102,7 +2102,7 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const void ClassDefImpl::writeTagFile(FTextStream &tagFile) { - if (!isLinkableInProject()) return; + if (!isLinkableInProject() || isArtificial()) return; tagFile << " tempArgs) { - tagFile << " " << convertToXML(a.name) << "" << endl; + tagFile << " " << convertToXML(a.type); + if (!a.name.isEmpty()) + { + tagFile << " " << convertToXML(a.name); + } + tagFile << "" << endl; } for (const auto &ibcd : m_impl->inherits) { diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 3fdde9b..5f00d1d 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -4191,10 +4191,7 @@ static void findTemplateInstanceRelation(const Entry *root, root->fileName,root->startLine,root->startColumn,templSpec,freshInstance)); if (instanceClass) { - if (isArtificial) - { - instanceClass->setArtificial(TRUE); - } + instanceClass->setArtificial(TRUE); instanceClass->setLanguage(root->lang); if (freshInstance) -- cgit v0.12 From 05701ea9dfa5092d22a4e15e1994bbc7a16462b2 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 16 Jan 2021 13:42:46 +0100 Subject: issue #8335: "failed to run html help compiler on index.hhp" with doxygen is 1.9.1 --- src/index.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.cpp b/src/index.cpp index c71e8fb..5f29418 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -298,7 +298,8 @@ static bool memberVisibleInIndex(const MemberDef *md) bool extractStatic = Config_getBool(EXTRACT_STATIC); return (!isAnonymous && (!hideUndocMembers || md->hasDocumentation()) && - (!md->isStatic() || extractStatic) + (!md->isStatic() || extractStatic) && + md->isLinkable() ); } -- cgit v0.12 From 7c58b5d10167ea83e05f2f99acc79d0a3a89abe4 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 16 Jan 2021 14:49:43 +0100 Subject: Update build_cmake.yml --- .github/workflows/build_cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 555319e..94f01b8 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -100,6 +100,7 @@ jobs: - name: Install libclang (Ubuntu 20.04) run: | sudo apt remove llvm-8 clang-8 libclang-common-8-dev clang-format-8 libllvm8 + sudo apt remove llvm-9 llvm-9-dev llvm-9-tools llvm-9-runtime clang-9 libclang-common-9-dev clang-format-9 libllvm9 #sudo apt remove llvm-10 llvm-10-dev llvm-10-tools llvm-10-runtime clang-10 clang-format-10 libclang-common-10-dev libclang-cpp10 libclang1-10 libllvm10 sudo apt-get autoremove sudo apt-get clean -- cgit v0.12 From cd5adc8965adbd8ab0f9b6a80d21f4eba770ae87 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 16 Jan 2021 16:31:55 +0100 Subject: issue #8338 \until and \skipline don't hide doxygen comments like \skip does The last line doesn't necessary contain the newline character, but the rule required it. The newline character will be handled, correctly, separately. --- src/code.l | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/code.l b/src/code.l index 6feda35..956034f 100644 --- a/src/code.l +++ b/src/code.l @@ -2016,20 +2016,15 @@ NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER} BEGIN(SkipComment); } } -<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment - if (Config_getBool(STRIP_CODE_COMMENTS)) - { - yyextra->yyLineNr++; - //nextCodeLine(yyscanner); - } - else +<*>^{B}*"//"[!/][^\n]* { // remove special one-line comment + if (!Config_getBool(STRIP_CODE_COMMENTS)) { startFontClass(yyscanner,"comment"); codifyLines(yyscanner,yytext); endFontClass(yyscanner); } } -<*>"//"[!/][^\n]*/\n { // strip special one-line comment +<*>"//"[!/][^\n]* { // strip special one-line comment if (YY_START==SkipComment || YY_START==SkipString) REJECT; if (!Config_getBool(STRIP_CODE_COMMENTS)) { -- cgit v0.12 From abffb84e0420deb5175cf1fb3f50949abf0c3b05 Mon Sep 17 00:00:00 2001 From: Mob Date: Fri, 15 Jan 2021 19:19:49 +0900 Subject: issue #8336 Python class only with async methods support --- src/pycode.l | 8 +++++++- src/pyscanner.l | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/pycode.l b/src/pycode.l index 65788cc..0362de4 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -190,7 +190,7 @@ SHORTSTRINGITEM ({SHORTSTRINGCHAR}|{ESCAPESEQ}) SHORTSTRINGCHAR [^\\\n"] STRINGLITERAL {STRINGPREFIX}?( {SHORTSTRING} | {LONGSTRING}) STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR") -KEYWORD ("lambda"|"import"|"class"|"assert"|"with"|"as"|"from"|"global"|"def"|"True"|"False") +KEYWORD ("lambda"|"import"|"class"|"assert"|"with"|"as"|"from"|"global"|"async"|"def"|"True"|"False") FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"if"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally") QUOTES ("\""[^"]*"\"") SINGLEQUOTES ("'"[^']*"'") @@ -302,6 +302,12 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU endFontClass(yyscanner); BEGIN( FunctionDec ); } + "async"{BB}"def"{BB} { + startFontClass(yyscanner,"keyword"); + codify(yyscanner,yytext); + endFontClass(yyscanner); + BEGIN( FunctionDec ); + } "class"{BB} { startFontClass(yyscanner,"keyword"); diff --git a/src/pyscanner.l b/src/pyscanner.l index 4a9552e..96d62ca 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -261,10 +261,20 @@ STARTDOCSYMS "##" searchFoundDef(yyscanner); BEGIN( FunctionDec ); } + ^{B}"async"{BB}"def"{BB} { // start of an async function/method definition with indent + DBG_CTX((stderr,"Found async def at %d\n",yyextra->yyLineNr)); + yyextra->indent=computeIndent(yytext); + searchFoundDef(yyscanner); + BEGIN( FunctionDec ); + } "def"{BB} { // start of a function/method definition searchFoundDef(yyscanner); BEGIN( FunctionDec ); } + "async"{BB}"def"{BB} { // start of a function/method definition + searchFoundDef(yyscanner); + BEGIN( FunctionDec ); + } ^{B}"class"{BB} { // start of a class definition with indent DBG_CTX((stderr,"Found class at %d\n",yyextra->yyLineNr)); -- cgit v0.12 From 3b15963316b59cd1af3468a43535d90343916ffb Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 18 Jan 2021 19:59:16 +0100 Subject: issue #8343: doxygen-1.9.1 crashes when parsing config file --- src/configimpl.l | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/configimpl.l b/src/configimpl.l index 7f73ec0..56a2e10 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -1210,7 +1210,7 @@ static void substEnvVarsInStrList(StringVector &sl) c=result.at(i); if (c=='"') // end quote { - results.push_back(result.mid(p,i-p).data()); + results.push_back(result.mid(p,i-p).str()); p=i+1; break; } @@ -1222,7 +1222,7 @@ static void substEnvVarsInStrList(StringVector &sl) } else if (c==' ' || c=='\t') // separator { - if (i>p) results.push_back(result.mid(p,i-p).data()); + if (i>p) results.push_back(result.mid(p,i-p).str()); p=i+1; } } @@ -1234,7 +1234,7 @@ static void substEnvVarsInStrList(StringVector &sl) } else // just goto the next element in the list { - if (!result.isEmpty()) results.push_back(result.data()); + if (!result.isEmpty()) results.push_back(result.str()); } } sl = results; @@ -1409,7 +1409,7 @@ static void cleanUpPaths(StringVector &str) QFileInfo fi(path.c_str()); if (fi.exists() && fi.isDir()) { - path = fi.absFilePath().utf8().data(); + path = fi.absFilePath().utf8().str(); if (path[path.size()-1]!='/') path+='/'; } } @@ -1545,7 +1545,7 @@ void Config::checkAndCorrect() QString p = QDir::currentDirPath(); if (p.at(p.length()-1)!='/') p.append('/'); - stripFromPath.push_back(p.utf8().data()); + stripFromPath.push_back(p.utf8().str()); } else { @@ -1882,7 +1882,7 @@ void Config::checkAndCorrect() if (inputSources.empty()) { // use current dir as the default - inputSources.push_back(QDir::currentDirPath().utf8().data()); + inputSources.push_back(QDir::currentDirPath().utf8().str()); } else { -- cgit v0.12 From 18f4cfb9b80f344d9cc0d8be0c3fdbd56b3e42a3 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 19 Jan 2021 12:43:28 +0100 Subject: issue #8343 doxygen-1.9.1 crashes when parsing config file (part 2) - In the past in case of a quoted string there was a space at the end of the string (as also indicated in the comment), now this space is gone so the `wasQuoted` would not kick in. A string with an escaped double quote should be / has to be escaped so it should also be included in the `wasQuoted` - missing one `data()` -> `str()` (should not give a problem due to the guard, but better for consistency). --- src/configimpl.l | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/configimpl.l b/src/configimpl.l index 56a2e10..25a32b8 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -1175,8 +1175,7 @@ static void substEnvVarsInStrList(StringVector &sl) for (const auto &s : sl) { QCString result = s.c_str(); - // an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE. - bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1); + bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1) || (result.find('"')!=-1); // here we strip the quote again substEnvVarsInString(result); @@ -1229,7 +1228,7 @@ static void substEnvVarsInStrList(StringVector &sl) } if (p!=l) // add the leftover as a string { - results.push_back(result.right(l-p).data()); + results.push_back(result.right(l-p).str()); } } else // just goto the next element in the list -- cgit v0.12 From 940ff32481a6e5ee8b123020b86889d4283b1290 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 19 Jan 2021 13:10:30 +0100 Subject: Github Actions could not find version 4.0 of MiKTeX MikTeX version miktexsetup-4.0-x64.zip was replaced by miktexsetup-4.0-20.12-x64.zip and miktexsetup-4.1-x64.zip Updated used version to 4.1 --- .github/workflows/build_cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 94f01b8..4ad755f 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -73,7 +73,7 @@ jobs: Do { $attemptCount++; Try { - $wc.DownloadFile("https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-4.0-x64.zip","miktexsetup-4.0-x64.zip") + $wc.DownloadFile("https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-4.1-x64.zip","miktexsetup-4.1-x64.zip") } Catch [Exception] { Write-Host $_.Exception | format-list -force } @@ -119,7 +119,7 @@ jobs: - name: Extract MikTex zip (Windows) shell: bash run: | - unzip miktexsetup-4.0-x64.zip + unzip miktexsetup-4.1-x64.zip if: matrix.config.os == 'windows-latest' - name: Download MikTex packages (Windows) -- cgit v0.12 From c1d50f10afc12849c06c4c6019297fc49e173a0d Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 19 Jan 2021 13:18:10 +0100 Subject: Github Actions could not find version 4.0 of MiKTeX Looks like also the name of the executable changed --- .github/workflows/build_cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 4ad755f..9f981a1 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -125,7 +125,7 @@ jobs: - name: Download MikTex packages (Windows) shell: bash run: | - ./miktexsetup --verbose \ + ./miktexsetup_standalone --verbose \ --local-package-repository=C:/miktex-repository \ --remote-package-repository="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/" \ --package-set=essential \ -- cgit v0.12 From 02aea12e45fa65652f6f5cf1be86777506646904 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 19 Jan 2021 13:23:29 +0100 Subject: Github Actions could not find version 4.0 of MiKTeX - Another place ... - corrected test --- .github/workflows/build_cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 9f981a1..6071771 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -77,7 +77,7 @@ jobs: } Catch [Exception] { Write-Host $_.Exception | format-list -force } - } while (((Test-Path "miktexsetup-x64.zip") -eq $false) -and ($attemptCount -le $maxAttempts)) + } while (((Test-Path "miktexsetup-4.1-x64.zip") -eq $false) -and ($attemptCount -le $maxAttempts)) shell: pwsh if: matrix.config.os == 'windows-latest' @@ -135,7 +135,7 @@ jobs: - name: Install MikTex packages (Windows) shell: bash run: | - ./miktexsetup --local-package-repository=C:/miktex-repository \ + ./miktexsetup_standalone --local-package-repository=C:/miktex-repository \ --package-set=essential \ --shared \ install -- cgit v0.12 From b3152b3c7d7393da12cd0f8fec7ade2606d51ed5 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 19 Jan 2021 18:14:09 +0100 Subject: Non default value not shown properly in doxywizard In case of a string list with no default values the changed item was not shown with a red color when the list to be used had elements. The test was done against the wrong list. --- addon/doxywizard/inputstrlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp index cdc7d14..591ba3a 100644 --- a/addon/doxywizard/inputstrlist.cpp +++ b/addon/doxywizard/inputstrlist.cpp @@ -276,8 +276,8 @@ bool InputStrList::isDefault() if (it1==m_strList.end() && it2==m_default.end()) return true; // one list is empty but the other is not - if (it1==m_default.end()) return false; - if (it2==m_strList.end()) return false; + if (it1==m_strList.end()) return false; + if (it2==m_default.end()) return false; it1 = m_strList.begin(); it2 = m_default.begin(); -- cgit v0.12 From 77a56dac2afe8987396052951986104af9efdbfe Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 20 Jan 2021 15:56:22 +0100 Subject: Missing CLANG dependency For the tag `CLANG_ADD_INC_PATHS` the dependency to the rag `CLANG_ASSISTED_PARSING` was missing, giving in the doxywizard the wrong impression about this tag. --- src/config.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.xml b/src/config.xml index e25c94e..5ec34b3 100644 --- a/src/config.xml +++ b/src/config.xml @@ -1740,11 +1740,11 @@ to disable this feature. ]]> -