From e238a37c1888e069ca1a6464f9e4e8f659e53fe7 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 2 Jan 2019 11:31:31 +0100 Subject: qdoc: Link buildversion field to navigation.landingpage For some modules, we use the 'buildversion' string to convey module-specific information such as license type(s). Linking the page helps users navigate to the detailed information displayed (or linked from) the landing page. Task-number: QTBUG-70801 Change-Id: I7f0f8b4d5bbb0306325264101e1478842b162863 Reviewed-by: Martin Smith --- src/qdoc/htmlgenerator.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp index 633ebfa0f..7eeb3705c 100644 --- a/src/qdoc/htmlgenerator.cpp +++ b/src/qdoc/htmlgenerator.cpp @@ -1915,13 +1915,29 @@ void HtmlGenerator::generateNavigationBar(const QString &title, if (buildversion.isEmpty()) return; - if (tableItems) { + navigationbar.clear(); + + if (tableItems) { out() << "\n" - << "\n"; + << "\n"; + else + out() << "\n"; } void HtmlGenerator::generateHeader(const QString& title, -- cgit v1.2.3
" - << buildversion << ""; + } else { + out() << "
  • "; + } + + // Link buildversion string to navigation.landingpage + if (!landingpage.isEmpty() && landingtitle != title) { + navigationbar << Atom(Atom::NavLink, landingpage) + << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) + << Atom(Atom::String, buildversion) + << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); + generateText(navigationbar, node, marker); } else { - out() << "
  • " << buildversion << "
  • \n"; + out() << buildversion; } + if (tableItems) + out() << "