From: Georg Sauthoff Date: Mon, 10 Mar 2014 12:35:05 +0000 (+0100) Subject: Sort authors, sort functions on the summary page X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=579a9a4d7d13457bffae92f4d765b45587c9f263;p=doxy2man Sort authors, sort functions on the summary page --- diff --git a/main.cc b/main.cc index 68731d3..3f56cb5 100644 --- a/main.cc +++ b/main.cc @@ -357,8 +357,9 @@ struct Header { void sort(const Options &o) { functions_sorted = functions; - if (o.enable_sort) + if (o.enable_sort) { qSort(functions_sorted.begin(), functions_sorted.end()); + } } void check(ostream &o) { @@ -519,6 +520,7 @@ QStringList extract_authors(const QVector &functions) // list.sort(); // QStringList::iterator end = unique(list.begin(), list.end()); list.removeDuplicates(); + list.sort(); return list; } @@ -613,8 +615,8 @@ void print_man_summary(QTextStream &o, const Header &h, const Options &opts) o << ".RS\n"; // move left margin to the right o << ".nf\n"; // no filling of output lines o << "\\fB\n"; // font to bold face - size_t w = get_type_width(h.functions); - foreach (const Function &f, h.functions) { + size_t w = get_type_width(h.functions_sorted); + foreach (const Function &f, h.functions_sorted) { o << fill_right(f.type, w) << f.name << "("; QVectorIterator i(f.parameters); if (i.hasNext())