diff options
author | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2019-10-08 14:11:29 +0200 |
---|---|---|
committer | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2019-10-15 15:17:47 +0200 |
commit | f3a1f775eeb4152bd045e69cbcd618d4f462d22f (patch) | |
tree | 96ed80136322b36fafcd21e2a41e1a5e8e137234 | |
parent | 64410bd26e220ddf2cb94ec86b697b42a2e791c2 (diff) |
Shiboken: QtDoc generator: Handle 'group' tag as a 'page' tag
Also, add a title for the resulting rst either
using the fullTitle or the title attribute.
Change-Id: If8be6a9a6db2cfc86bc4b646159ccc6f2210e243
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp index c8bb2fffa..3b6d1c870 100644 --- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp +++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp @@ -349,6 +349,7 @@ QtXmlToSphinx::QtXmlToSphinx(QtDocGenerator* generator, const QString& doc, cons m_handlerMap.insert(QLatin1String("skipto"), &QtXmlToSphinx::handleIgnoredTag); m_handlerMap.insert(QLatin1String("target"), &QtXmlToSphinx::handleTargetTag); m_handlerMap.insert(QLatin1String("page"), &QtXmlToSphinx::handlePageTag); + m_handlerMap.insert(QLatin1String("group"), &QtXmlToSphinx::handlePageTag); // useless tags m_handlerMap.insert(QLatin1String("description"), &QtXmlToSphinx::handleUselessTag); @@ -1230,10 +1231,11 @@ void QtXmlToSphinx::handlePageTag(QXmlStreamReader &reader) m_output << rstLabel(title.toString()); const QStringRef fullTitle = reader.attributes().value(fullTitleAttribute()); - if (!fullTitle.isEmpty()) { - const int size = writeEscapedRstText(m_output, fullTitle); - m_output << endl << Pad('*', size) << endl << endl; - } + const int size = fullTitle.isEmpty() + ? writeEscapedRstText(m_output, title) + : writeEscapedRstText(m_output, fullTitle); + + m_output << endl << Pad('*', size) << endl << endl; const QStringRef brief = reader.attributes().value(briefAttribute()); if (!brief.isEmpty()) |