diff options
author | Sergio Oller <sergioller@gmail.com> | 2013-09-14 18:06:06 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-09-28 22:05:33 (GMT) |
commit | e835d4b28e1db3bdcdf3bfa718bc85445587ccd9 (patch) | |
tree | 074cf95073900a2514e1b67ce0f9db84a879cc95 /src/filedef.cpp | |
parent | 54f60c116bdb22b6ec5a11ced9888ebe2785eb2b (diff) | |
download | Doxygen-e835d4b28e1db3bdcdf3bfa718bc85445587ccd9.zip Doxygen-e835d4b28e1db3bdcdf3bfa718bc85445587ccd9.tar.gz Doxygen-e835d4b28e1db3bdcdf3bfa718bc85445587ccd9.tar.bz2 |
Bug 707641 - `FILTER_SOURCE_FILES=YES` required to build CALL_GRAPHS
https://bugzilla.gnome.org/show_bug.cgi?id=707641
Add references if the file is filtered, as the parser
does not know whether we are insideBody or not.
Diffstat (limited to 'src/filedef.cpp')
-rw-r--r-- | src/filedef.cpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp index 7bd6aeb..b12ecd3 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -807,6 +807,7 @@ void FileDef::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu) static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES"); static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); + DevNullCodeDocInterface devNullIntf; QCString title = m_docname; if (!m_fileVersion.isEmpty()) { @@ -878,10 +879,33 @@ void FileDef::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu) ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension()); pIntf->resetCodeParserState(); ol.startCodeFragment(); + bool needs2PassParsing = + Doxygen::parseSourcesNeeded && // we need to parse (filtered) sources for cross-references + !filterSourceFiles && // but user wants to show sources as-is + !getFileFilter(absFilePath(),TRUE).isEmpty(); // and there is a filter used while parsing + + if (needs2PassParsing) + { + // parse code for cross-references only (see bug707641) + pIntf->parseCode(devNullIntf,0, + fileToString(absFilePath(),TRUE,TRUE), + getLanguage(), + FALSE,0,this + ); + } pIntf->parseCode(ol,0, fileToString(absFilePath(),filterSourceFiles,TRUE), - getLanguage(), - FALSE,0,this + getLanguage(), // lang + FALSE, // isExampleBlock + 0, // exampleName + this, // fileDef + -1, // startLine + -1, // endLine + FALSE, // inlineFragment + 0, // memberDef + TRUE, // showLineNumbers + 0, // searchCtx + !needs2PassParsing // collectXRefs ); ol.endCodeFragment(); } |