From: Vladimír Vondruš Date: Thu, 13 Sep 2018 10:29:31 +0000 (+0200) Subject: doxygen: deprecation status also for pages. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=0dac98dee175fbf64919a36a5b196d35aecb55b9;p=blog.git doxygen: deprecation status also for pages. Originally I didn't think this would ever be useful, but recently I deprecated a whole library and thus also the overview pages for it should be marked as deprecated. --- diff --git a/doc/doxygen.rst b/doc/doxygen.rst index 2ea7b2e6..7789110b 100644 --- a/doc/doxygen.rst +++ b/doc/doxygen.rst @@ -1196,8 +1196,7 @@ Property Description :py:`compound.footer_navigation` Footer navigation of a page. See `Navigation properties`_ for details. :py:`compound.brief` Brief description. Can be empty. [1]_ -:py:`compound.is_deprecated` Whether the compound is deprecated. Not - set for pages. [7]_ +:py:`compound.is_deprecated` Whether the compound is deprecated. [7]_ :py:`compound.description` Detailed description. Can be empty. [2]_ :py:`compound.modules` List of submodules in this compound. Set only for modules. See diff --git a/doxygen/templates/pages.html b/doxygen/templates/pages.html index fe4b7ce5..b82458c7 100644 --- a/doxygen/templates/pages.html +++ b/doxygen/templates/pages.html @@ -7,13 +7,13 @@ {% for i in index.pages recursive %} {% if i.children %}
  • - {{ i.name }} {{ i.brief }} + {{ i.name }}{% if i.is_deprecated %} deprecated{% endif %} {{ i.brief }}
  • {% else %} -
  • {{ i.name }} {{ i.brief }}
  • +
  • {{ i.name }}{% if i.is_deprecated %} deprecated{% endif %} {{ i.brief }}
  • {% endif %} {% endfor %} diff --git a/doxygen/test/compound_deprecated/Doxyfile b/doxygen/test/compound_deprecated/Doxyfile index 796610f6..b82af850 100644 --- a/doxygen/test/compound_deprecated/Doxyfile +++ b/doxygen/test/compound_deprecated/Doxyfile @@ -1,4 +1,4 @@ -INPUT = Dir +INPUT = Dir deprecated-page.dox RECURSIVE = YES AUTOLINK_SUPPORT = NO QUIET = YES diff --git a/doxygen/test/compound_deprecated/deprecated-page.dox b/doxygen/test/compound_deprecated/deprecated-page.dox new file mode 100644 index 00000000..1f20b58b --- /dev/null +++ b/doxygen/test/compound_deprecated/deprecated-page.dox @@ -0,0 +1,11 @@ +/** @page deprecated-page Deprecated page +@brief A page +@deprecated This page is deprecated. + +@subpage deprecated-subpage +*/ + +/** @page deprecated-subpage Deprecated sub-page +@brief A sub-page +@deprecated This page is *also* deprecated. +*/ diff --git a/doxygen/test/compound_deprecated/pages.html b/doxygen/test/compound_deprecated/pages.html new file mode 100644 index 00000000..c1033c7d --- /dev/null +++ b/doxygen/test/compound_deprecated/pages.html @@ -0,0 +1,52 @@ + + + + + My Project + + + + + +
    +
    +
    +
    +
    +

    Pages

    + + +
    +
    +
    +
    + + diff --git a/doxygen/test/test_compound.py b/doxygen/test/test_compound.py index aa91be98..826c6de7 100644 --- a/doxygen/test/test_compound.py +++ b/doxygen/test/test_compound.py @@ -185,6 +185,9 @@ class Deprecated(IntegrationTestCase): # Namespace tree self.assertEqual(*self.actual_expected_contents('namespaces.html')) + # Page tree + self.assertEqual(*self.actual_expected_contents('pages.html')) + # Base and derived class listing self.assertEqual(*self.actual_expected_contents('structDeprecatedNamespace_1_1BaseDeprecatedClass.html')) self.assertEqual(*self.actual_expected_contents('structDeprecatedNamespace_1_1DeprecatedClass.html'))