summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-08-04 18:54:42 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-08-04 18:54:42 (GMT)
commite7a188b769b9eed3b0c6501890d2f36b6475ade9 (patch)
tree8c0e8ebcb4571fadd8b5c7e106cfed6289a90b7b /src/util.cpp
parentc5c763056535216ccce4bed4892358bf5c8d1fd5 (diff)
parent4074da5b83d37dd1c72c5df015fb2b41e7725a7e (diff)
downloadDoxygen-e7a188b769b9eed3b0c6501890d2f36b6475ade9.zip
Doxygen-e7a188b769b9eed3b0c6501890d2f36b6475ade9.tar.gz
Doxygen-e7a188b769b9eed3b0c6501890d2f36b6475ade9.tar.bz2
Merge branch 'feature-groupbreadcrumbs' of https://github.com/NimbusKit/doxygen into NimbusKit-feature-groupbreadcrumbs
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/util.cpp b/src/util.cpp
index bcb1390..9dd7bca 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6353,26 +6353,40 @@ void addRefItem(const QList<ListItemInfo> *sli,
}
}
-void addGroupListToTitle(OutputList &ol,Definition *d)
+bool recursivelyAddGroupListToTitle(OutputList &ol,Definition *d,bool root,bool shouldRecurse)
{
GroupList *groups = d->partOfGroups();
if (groups) // write list of group to which this definition belongs
{
- ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
- ol.writeString("<div class=\"ingroups\">");
+ if (root) {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.writeString("<div class=\"ingroups\">");
+ }
GroupListIterator gli(*groups);
GroupDef *gd;
- bool first=TRUE;
+ bool first=true;
for (gli.toFirst();(gd=gli.current());++gli)
{
- if (!first) { ol.writeString(" &#124; "); } else first=FALSE;
+ if (shouldRecurse && recursivelyAddGroupListToTitle(ol, gd, false, shouldRecurse)) {
+ ol.writeString(" > ");
+ }
+ if (!first) { ol.writeString(" &#124; "); } else first=FALSE;
ol.writeObjectLink(gd->getReference(),
gd->getOutputFileBase(),0,gd->groupTitle());
}
- ol.writeString("</div>");
- ol.popGeneratorState();
+ if (root) {
+ ol.writeString("</div>");
+ ol.popGeneratorState();
+ }
+ return true;
}
+ return false;
+}
+
+void addGroupListToTitle(OutputList &ol,Definition *d)
+{
+ recursivelyAddGroupListToTitle(ol,d,true,Config_getBool("BREAD_CRUMB_TRAIL"));
}
void filterLatexString(FTextStream &t,const char *str,