diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-05-23 12:19:31 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-05-23 12:19:31 (GMT) |
commit | e965e5da00bce6076d7009e4a48acee76fc84a7c (patch) | |
tree | 7d359e095ae2413b2e36b8d9dc5cd34400b971cd /src/doxygen.cpp | |
parent | 5ee697da531e020e5f0354f22ef2b929cce7c823 (diff) | |
download | Doxygen-e965e5da00bce6076d7009e4a48acee76fc84a7c.zip Doxygen-e965e5da00bce6076d7009e4a48acee76fc84a7c.tar.gz Doxygen-e965e5da00bce6076d7009e4a48acee76fc84a7c.tar.bz2 |
issue #8560: Regression: In Python/xml output, refid and qualified name of base compound not resolved under certain conditions (part 3)
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index e4ec017..9e2f737 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -741,7 +741,7 @@ static Definition *buildScopeFromQualifiedName(const QCString &name_,SrcLangExt else if (nd==0 && cd==0 && fullScope.find('<')==-1) // scope is not known and could be a namespace! { // introduce bogus namespace - //printf("++ adding dummy namespace %s to %s tagInfo=%p\n",qPrint(nsName),qPrint(prevScope->name()),tagInfo); + //printf("++ adding dummy namespace %s to %s tagInfo=%p\n",qPrint(nsName),qPrint(prevScope->name()),(void*)tagInfo); NamespaceDefMutable *newNd= toNamespaceDefMutable( Doxygen::namespaceLinkedMap->add(fullScope, @@ -1976,15 +1976,16 @@ static void buildListOfUsingDecls(const Entry *root) } -static void findUsingDeclarations(const Entry *root) +static void findUsingDeclarations(const Entry *root,bool filterPythonPackages) { if (root->section==Entry::USINGDECL_SEC && - !(root->parent()->section&Entry::COMPOUND_MASK) // not a class/struct member + !(root->parent()->section&Entry::COMPOUND_MASK) && // not a class/struct member + (!filterPythonPackages || (root->lang==SrcLangExt_Python && root->fileName.endsWith("__init__.py"))) ) { //printf("Found using declaration %s at line %d of %s inside section %x\n", // qPrint(root->name),root->startLine,qPrint(root->fileName), - // rootNav->parent()->section()); + // root->parent()->section); if (!root->name.isEmpty()) { ClassDefMutable *usingCd = 0; @@ -2023,7 +2024,7 @@ static void findUsingDeclarations(const Entry *root) usingCd = toClassDefMutable(Doxygen::hiddenClassLinkedMap->find(name)); // check if it is already hidden } - //printf("%s -> %p\n",qPrint(root->name),usingCd); + //printf("%s -> %p\n",qPrint(root->name),(void*)usingCd); if (usingCd==0) // definition not in the input => add an artificial class { Debug::print(Debug::Classes,0," New using class '%s' (sec=0x%08x)! #tArgLists=%d\n", @@ -2059,7 +2060,7 @@ static void findUsingDeclarations(const Entry *root) } } } - for (const auto &e : root->children()) findUsingDeclarations(e.get()); + for (const auto &e : root->children()) findUsingDeclarations(e.get(),filterPythonPackages); } //---------------------------------------------------------------------- @@ -9935,6 +9936,13 @@ static void readDir(FileInfo *fi, } } } + if (resultList) + { + // sort the resulting list to make the order platform independent. + std::sort(resultList->begin(), + resultList->end(), + [](const auto &f1,const auto &f2) { return qstricmp(f1.c_str(),f2.c_str())<0; }); + } } @@ -11515,7 +11523,8 @@ void parseInput() g_s.begin("Searching for members imported via using declarations...\n"); // this should be after buildTypedefList in order to properly import // used typedefs - findUsingDeclarations(root.get()); + findUsingDeclarations(root.get(),TRUE); // do for python packages first + findUsingDeclarations(root.get(),FALSE); // then the rest g_s.end(); g_s.begin("Searching for included using directives...\n"); |