From 10d62f3e19eeea7a7a99d4e5cd756e0aadd33233 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 29 Jan 2018 23:47:32 +0100 Subject: [PATCH] doxygen: render Reference in TOC only if there is some reference. --- doxygen/templates/base-reference.html | 2 ++ .../compound_modules/group__subgroup.html | 27 ++----------------- doxygen/test/compound_modules/input.h | 10 +++---- 3 files changed, 7 insertions(+), 32 deletions(-) diff --git a/doxygen/templates/base-reference.html b/doxygen/templates/base-reference.html index 811fe571..51a87e05 100644 --- a/doxygen/templates/base-reference.html +++ b/doxygen/templates/base-reference.html @@ -41,6 +41,7 @@
  • {{ name }}
  • {% endif %} {% endfor %} + {% if compound.modules or compound.dirs or compound.files or compound.namespaces or compound.classes or compound.typedefs or compound.funcs or compound.vars or compound.defines or compound.groups %}
  • Reference
  • + {% endif %} {% endif %} diff --git a/doxygen/test/compound_modules/group__subgroup.html b/doxygen/test/compound_modules/group__subgroup.html index 73269df6..0033b88c 100644 --- a/doxygen/test/compound_modules/group__subgroup.html +++ b/doxygen/test/compound_modules/group__subgroup.html @@ -35,33 +35,10 @@

    Contents

    -
    -

    Functions

    -
    -
    - auto fizzbuzz() -> int -
    -
    Returns 5 every 5 runs or something.
    -
    -
    -
    -

    Function documentation

    -
    -

    - int fizzbuzz() -

    -

    Returns 5 every 5 runs or something.

    -

    Did I pass the interview now?

    -
    -
    +

    Description

    Subgroup description. There are no members, so there should be also no Reference section in the TOC.

    diff --git a/doxygen/test/compound_modules/input.h b/doxygen/test/compound_modules/input.h index 753fe3a0..c795f7f8 100644 --- a/doxygen/test/compound_modules/input.h +++ b/doxygen/test/compound_modules/input.h @@ -21,13 +21,9 @@ void bar(); @defgroup subgroup A subgroup @brief Subgroup brief description @ingroup group -@{ */ -/** -@brief Returns 5 every 5 runs or something +@section subgroup-description Description -Did I pass the interview now? +Subgroup description. There are **no members**, so there should be also no +Reference section in the TOC. */ -int fizzbuzz(); - -/*@}*/ -- 2.30.2