diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-14 09:32:34 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-14 11:49:39 +0100 |
| commit | 4885f61826c5d60ab7b301d8cf0539686eea9d45 (patch) | |
| tree | 3133411535a5a73978464cf34d50bff3d53d22fa /sources/shiboken6/ApiExtractor/qtdocparser.cpp | |
| parent | 54480637fb019f2a1603e5263b949e3bd918a0c9 (diff) | |
shiboken6/Documentation: Fix Qt module description extraction
- Fix the module index webxml file name.
- Fix the link to the QML type pages.
- Add a special case for QtQuickControls2
Change-Id: I7c4b4cf8451d6d21dc43ad137d79f890674a944c
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/qtdocparser.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/qtdocparser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sources/shiboken6/ApiExtractor/qtdocparser.cpp b/sources/shiboken6/ApiExtractor/qtdocparser.cpp index 36f83deb5..7f5b71363 100644 --- a/sources/shiboken6/ApiExtractor/qtdocparser.cpp +++ b/sources/shiboken6/ApiExtractor/qtdocparser.cpp @@ -338,8 +338,8 @@ static QString qmlReferenceLink(const QFileInfo &qmlModuleFi) { QString result; QTextStream(&result) << "<para>The module also provides <link" - << " type=\"page\"" - << " page=\"http://doc.qt.io/qt-5/" << qmlModuleFi.baseName() << ".html\"" + << R"( type="page" page="http://doc.qt.io/qt-)" << QT_VERSION_MAJOR + << '/' << qmlModuleFi.baseName() << R"(.html")" << ">QML types</link>.</para>"; return result; } @@ -350,12 +350,12 @@ Documentation QtDocParser::retrieveModuleDocumentation(const QString& name) // dots as module separators in package names. Improve this. QString moduleName = name; moduleName.remove(0, name.lastIndexOf(QLatin1Char('.')) + 1); + if (moduleName == u"QtQuickControls2") + moduleName.chop(1); const QString prefix = documentationDataDirectory() + QLatin1Char('/') + moduleName.toLower(); - QString sourceFile = prefix + QLatin1String(".xml"); - if (!QFile::exists(sourceFile)) - sourceFile = prefix + QLatin1String("-module.webxml"); + const QString sourceFile = prefix + u"-index.webxml"_qs; if (!QFile::exists(sourceFile)) { qCWarning(lcShibokenDoc).noquote().nospace() << "Can't find qdoc file for module " << name << ", tried: " |
