aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-15 13:34:32 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-15 15:48:24 +0000
commit021b7d8fe8ed58c742fec8527ad9abeb80c4e715 (patch)
tree402b9e75ed275ebb3c1cd43c80e154ba38ab18bb
parent6510dce065ccdbf1f62a79f8c50351f339a351d7 (diff)
shiboken6/Documentation: Fix the TOC tables for modules with < 4 classes per character
Do not pad each table to 4 columns as this can lead to problems with trailing empty columns. Leave the normalization to QtXmlToSphinx::Table::normalize() instead. Amends e20d9db9e9dc8d599b76873d90a34acafe9fd9fe. Change-Id: I7b8b465856b58b8443f17f5c103a11b4009a0014 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 2e23681d8955b077e34ff064c242b53a0e5b9ea8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
index 5850754ae..01cde5923 100644
--- a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
@@ -807,11 +807,8 @@ static void writeFancyToc(TextStream& s, const QStringList& items)
const QString entry = QLatin1String("* :doc:`") + item + QLatin1Char('`');
row << QtXmlToSphinx::TableCell(entry);
}
- if (!row.isEmpty()) {
- while (row.size() < numColumns)
- row << QtXmlToSphinx::TableCell(QString{});
+ if (!row.isEmpty())
table.appendRow(row);
- }
}
table.normalize();