Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,14 @@ Go to the <a href="commands.html">next</a> section or return to the
]]>
</docs>
</option>
<option type='bool' id='SORT_RELATED_PAGES' defval='0'>
<docs>
<![CDATA[
The \c SORT_RELATED_PAGES tag can be used to enable (\c YES) or
disable (\c NO) sorting of Generted Pages by title.
]]>
</docs>
</option>
<option type='bool' id='GENERATE_TESTLIST' defval='1'>
<docs>
<![CDATA[
Expand Down
10 changes: 10 additions & 0 deletions src/doxygen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5510,6 +5510,16 @@ static void addListReferences()
static void generateXRefPages()
{
AUTO_TRACE();

if(Config_getBool(SORT_RELATED_PAGES))
{
std::stable_sort(RefListManager::instance().begin(),
RefListManager::instance().end(),
[](const RefListManager::Ptr& left,
const RefListManager::Ptr& right)
{ return qstricmp_sort(left->pageTitle(),right->pageTitle()) < 0; });
}

for (RefListManager::Ptr &rl : RefListManager::instance())
{
rl->generatePage();
Expand Down
8 changes: 7 additions & 1 deletion src/reflist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,21 @@ void RefList::generatePage()
std::stable_sort(m_entries.begin(),m_entries.end(),
[](const std::unique_ptr<RefItem> &left,const std::unique_ptr<RefItem> &right)
{ return qstricmp_sort(left->title(),right->title()) < 0; });
//RefItem *item;

QCString doc;
int cnt = 0;
doc += "<dl class=\"reflist\">";
QCString lastGroup;
bool first=true;
fprintf(stderr, "*****\n***** [%s][%s]\n*****\n",
pageTitle().str().c_str(),
sectionTitle().str().c_str());

for (const std::unique_ptr<RefItem> &item : m_entries)
{
if (item->name().isEmpty()) continue;
fprintf(stderr, "*****\n***** <%s><%s>\n*****\n",
item->title().str().c_str(), item->group().str().c_str()); //RefItem *item;
cnt++;
bool startNewGroup = item->group()!=lastGroup;
if (startNewGroup)
Expand Down