aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2019-12-12 09:20:27 +0100
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2019-12-12 09:47:25 +0100
commit2cfa859283355f7710b5fcd56b948a149d12032a (patch)
tree8f5132f0f548419ef87ae67a6dec693862355b73
parent4b908a86dfae0a0be53e25d8a3357e2de7dd98e0 (diff)
Shiboken: QtDoc: Fix the fancy TOC in the module index page
The TOC groups the classes alphabetically, ignoring the 'Q' prefix at the beginning. It did not consider classes without the 'Q' prefix, such as Signal and Slot in the QtCore module. The else block should handle that as well now. Change-Id: I0fc22ba86650299de924d22c970d6fe6e31567c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
index ca9f9b3ae..9c9a2ff1e 100644
--- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
@@ -2119,6 +2119,9 @@ static void writeFancyToc(QTextStream& s, const QStringList& items, int cols = 4
continue;
if (item.startsWith(Q) && item.length() > 1)
idx = item[1];
+ else
+ idx = item[0]; // To group classes without the 'Q' prefix
+
item.chop(4); // Remove the .rst extension
tocMap[idx] << item;
}