Skip to content

Commit

Permalink
Minor improvements to C++20 module references
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Aug 22, 2023
1 parent d4ec94f commit a225a83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/index.cpp
Expand Up @@ -449,15 +449,16 @@ static void writeMemberToIndex(const Definition *def,const MemberDef *md,bool ad
bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
const MemberVector &enumList = md->enumFieldList();
bool isDir = !enumList.empty() && md->isEnumerate();
QCString name = def->definitionType()==Definition::TypeModule ? md->qualifiedName() : md->name();
if (md->getOuterScope()==def || md->getOuterScope()==Doxygen::globalScope)
{
Doxygen::indexList->addContentsItem(isDir,
md->name(),md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,addToIndex && md->getGroupDef()==nullptr);
name,md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,addToIndex && md->getGroupDef()==nullptr);
}
else // inherited member
{
Doxygen::indexList->addContentsItem(isDir,
md->name(),def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,addToIndex && md->getGroupDef()==nullptr);
name,def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,addToIndex && md->getGroupDef()==nullptr);
}
if (isDir)
{
Expand Down Expand Up @@ -2755,7 +2756,7 @@ static void writeMemberList(OutputList &ol,bool useSections,const std::string &p
const char *sep;
bool isFunc=!md->isObjCMethod() &&
(md->isFunction() || md->isSlot() || md->isSignal());
QCString name=md->name();
QCString name=type==Definition::TypeModule ? md->qualifiedName() : md->name();
int startIndex = getPrefixIndex(name);
if (name.data()+startIndex!=prevName) // new entry
{
Expand Down Expand Up @@ -2983,7 +2984,7 @@ void Index::addFileMemberNameToIndex(const MemberDef *md)
void Index::addModuleMemberNameToIndex(const MemberDef *md)
{
const ModuleDef *mod = md->getModuleDef();
if (mod && mod->isLinkableInProject() && md->isLinkableInProject())
if (mod && mod->isPrimaryInterface() && mod->isLinkableInProject() && md->isLinkableInProject())
{
QCString n = md->name();
std::string letter = getUTF8CharAt(n.str(),getPrefixIndex(n));
Expand Down
5 changes: 5 additions & 0 deletions src/moduledef.cpp
Expand Up @@ -934,6 +934,11 @@ void ModuleDefImpl::writeFiles(OutputList &ol,const QCString &title)
ol.startMemberItem(fd->getOutputFileBase(),OutputGenerator::MemberItemType::Normal);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
QCString path=fd->getPath();
if (Config_getBool(FULL_PATH_NAMES))
{
ol.docify(stripFromPath(path));
}
if (fd->isLinkable())
{
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->displayName());
Expand Down

0 comments on commit a225a83

Please sign in to comment.