From 2cfa859283355f7710b5fcd56b948a149d12032a Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Thu, 12 Dec 2019 09:20:27 +0100 Subject: 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 --- sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sources/shiboken2/generator/qtdoc') 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; } -- cgit v1.2.3